Even though your battery seems to be working fine, I would try to get a new battery and see if it corrects the problem. If not then I would attempt to reset the phone factory or even trying to reset the settings only back to factory.
If none of this works, I would assume that you have something more serious going wrong. There is a chip on your phone that controls charging and everything about your battery. This chip could be bad causing it to think your battery is dead even though it isn't. I am not sure if the battery has anything on it that controls all of this as well.
You could also try resetting the phone to factory before buying a new battery.