A couple times people have reported similar problems to me, it turned out they didn't know they were supposed to push the SD card all the way in until it clicks and locks in place. There's a spring-loaded locking mechanism you have to engage by pushing the card in far enough. To remove it, you have to push it in again until it clicks and ejects. (This is the way most SD and microSD card slots work. I don't have experience with Nikon DSLRs so don't know if they use the same mechanism.) They were just sliding the card in but not locking it in place. The poor connection caused the error messages.
You can also try peeking inside the slot with a flashlight to see if there's any dust or debris which is preventing good contact between...