This eliminates the charger.
So either the battery is bad or the controller on the bike is bad.
You can check the battery with a voltmeter, if you have one and know how to use it. Turn it to DC volts (the symbol for DC is a solid bar over a dotted bar) and check each combination of battery terminals. Do any of them read somewhere around 40 V? If not, the battery's toast and that points to the bike's controller being faulty.
__________________
-Jeremy