Did you replace it with an OEM battery or an aftermarket one? If aftermarket that could be your issue. They aren't always up to par.
Also, if the problem wasn't the battery but the charger cord, then this could be your problem. If the cord isn't putting out enough power to charge the battery and run the device, but is putting out enough power to only power the device, then it would need replacing.
Also, there is the possibility that it is the charging circuit that is damaged.