Hello!
From what you've said in your question, it seems like either the battery isn't connected properly or it's a bad battery. There is also a small chance that the circuitry that brings the power from the battery to the rest of the board might be shorted and the one from the wire is fine (Happens sometimes), but the easiest option would be to check the battery first.
Easiest thing to check first would be the battery connector. Make sure there's no corrosion or anything blocking the battery contacts from making a good connection (since liquid damage could be a factor here). If there is some sign of corrosion (Usually it's be a green/teal color) you might have some success taking an old toothbrush and some high-percentage isopropyl alcohol and cleaning the contacts. Be sure to use a high percentage isopropyl (99% works best) for best results (don't use hand sanitizer-- it leaves residue)
The second thing to check would be the battery itself. If there's no sign of corrosion then it might be a good idea to check if the battery itself is ok. If you have a spare controller you could put the battery in there and see if it works. If not, you could also use a multimeter to check if the battery voltage is good (it could be a smidge off-- no more than 0.5v off from advertised is rule of thumb).
If the battery itself is good, then more than likely it's the controller and it'll have to be replaced.