Yep format in the camera. Check the slot for the card in the camera for dirt.
>>If THAT does not format, the camera needs repair. <<
I think that, if is not under warranty, if it needed repair, the probability of that repair being economically practical are close to nil.