Why would you think it is not the battery? It's one if the more common problems. If it isn't a battery, there's something wrong with the charging system. If you had an off-road bike, that's most commonly a rubbed wire from the stator, as it crosses a hard part of the bike. Otherwise, it's probably a rectifier or stator gone bad.
My bet is that it's just the battery. They "moss-over" fairly easily, and short themselves out internally. Is your battery a sealed unit, or do you have to add water? Check the water level if it's not sealed.