And where did you buy it? iFixIt gives guarantee on its batteries, for example: https://www.ifixit.com/products/nintendo-wii-u-gamepad-replacement-battery
//EDIT:
You could check if the batterie holds any charge or is DoA (shows 0 V) with a multimeter. Also you could check the batteries cables...