Assuming your wires and cables are in good shape, the battery may just be bad. If it has sat for a while, it may not charge right again either. It could be dead enough to keep the bike from running. Atv stators are pretty weak, so they don't charge much like a car's alternator. Combine a weak stator with a dead or possibly shorted battery and you see what can happen.
I would have the battery tested at a place you trust and see what they say.
2001 Mojave sold
2002 Race prepped Mojave with all the toys FOR SALE $1,500 obo
2003/05 Z400 too much to list
In Memory of Christopher Riley Andrews
1-24-02 to 1-23-06