No matter what the problem is, treat your bike to a new battery, i think it deserves it.
If the battery is never allowed to go flat it can last well over 10 years. I replaced mine after 10 years after I fitted heated grips because they would switch off with the engine idling at traffic lights. The new battery made no difference. But AGM batteries do not like going flat and being asked to deliver high currents when partially discharged. Just one occasion of carrying on trying to start an engine until the battery won't turn the engine over or the solenoid clicks can ruin a battery and it won't hold a charge properly again.