Nikon D3100 Battery Issue?

So, I purchased a Nikon D3100 around a month ago, and it was working fine until something odd happened to the battery. It seemed that whenever I went to go charge it, the battery would not hold a charge. It would only take a few pictures or so and then it would say that I had to recharge the battery. I decided that it was a faulty battery, and I sent the camera back in exchange for a new one, but now the same thing is happening again. I don't understand what it is I'm doing wrong, and how I could have such bad luck with both cameras. Any advice?

Usually, it is good to charge the battery
16 hours before using it the first time
refer to the manual for details

Try plugging the charger into an outlet that you are certain has power.