Read this on www.tomsguide.com So make of it what you will.
''try this ... i had the same problem with the same camera and this fixed it.
remove the battery, and remove the memory card ... then re-install the battery & turn on the camera. this process seems to reset the camera, if the battery ran too low.
now you can re-install the memory card & battery and resume normal operation.
be sure to check for the small flashing green light on the back of the camera (next to the "flash" indicator symbol). it should be blinking when the camera is charging.''
[https://www.nikonimgsupport.com/ni/NI_article?articleNo=000004210&configured=1&lang=en_CA|Actual Nikon fix]