you've just bought a new battery so we will rule that out assuming its a genuine Nikon battery and not some cheap 3rd party copy.
the first thing to do is give the battery compartment a good clean, making sure there is no dust, debris or corrosion preventing a proper contact with the battery.
Next you'll need to open up you camera and check the connections between the battery and motherboard are good.
you can follow this guide to open up your camera
[guide|25684]