Well one, if the new battery is aftermarket and not OEM, that could be why it won't work. Aftermarket batteries are not a good idea.
However, try this. Turn off the laptop (powered completely off) and see if it will charge then. If it does, then it may well be your charger that is the problem. When they start to go bad they can start not being able to both run the device and charge the battery. If that is the case here, and it charges when off, then you need a new charger.
If it won't charge, even when off, then either the battery you got is not good, or the charging circuit may be bad and need replacing (which would mean replacing the motherboard).