Can you fill us in with some detail. Year/miles/service history/any other recent problems or changes/fault codes.
Can I assume this occurs when you are riding?
Does the ABS actually work or does actuation of the brakes fire the warning light?
When were the brake pads last changed & the ABS pump purged?
Have you checked the ABS fuses with a meter? - fuse #1 for the motor & in the fuse panel fuses #2 & 9 (on my Gen2).
Any chance the new battery was fitted with reverse polarity accidentally, even if only for seconds?
At first glance this seems it could just be a rogue connector somewhere, so it's worth checking all the neg/earth connections through.
Come back to us when you have a moment.