A quick test is to pull up on the foot pedal. IF the light goes out, then you need to also clean and lube the foot pedal pivot shaft.
I also found that the brake light switch, behind the hand brake lever, needed a good clean, too! It was "gummy" inside the actual switch.
But, be very careful taking that thing apart!!! It can easily break, or you will launch the spring that is in there, across the garage.... I mean, I don't know what I am talking about...
Anyway, a few days later, I found the spring, and now that switch is working perfectly again after a good clean and lube!
'06 FJR1300A Orion the Hunter