Check beneath the flywheel on the charging system. With John Deere's, there is a common problem with wires simply slipping off of the charging system causing them not to operate or charge like they should. If you are trying to charge the battery but are not having any success, try tightening the wires connecting to the charging system, this will solve the most common problems.
Check your ground connections. The battery will have to be grounded in some way to charge it. If it is not grounded, the battery will not charge causing many people to believe that their battery is malfunctioning. However, all you have to do is ground the battery via the enclosed grounding connections and the batter will charge. To find out how to do this, consult your user's manual.
Check the alternator. The alternator is what perpetrates the power from the battery to all other parts of the John Deere. If the alternator is bad, the battery will not charge properly because the power will be leached into other areas prematurely. The alternator will actually be more expensive to replace than the battery would have been, but, unfortunately, it will have to be changed if you want the John Deere to work. It might be under warranty, so check that before purchasing anything.