Double check with Apple or an Apple Authorized support Store on the cost, guessing between $400 to $600. I had the battery replaced on my Late 2013 MacBook Pro in October 2020, the cost then was $350, and it is still an excellent backup machine that I use in my Home Office hooked up to a 32" Monitor with a wireless Keyboard and Track Pad.
If the rest of the machine is in Solid Shape, I would strongly consider getting it done. The bonus is the new top half of the machine (new keyboard, trackpad, and top half of case.
DO NOT even think about doing this repair on your own, and make sure if you move forward, you only Allow Apple or an Apple Authorized Dealer to do the repair; also make sure to do several backups before taking it in, just in case.