You should be able to trim the black heat shrink on the connector, peel back some of the insulation, and re-solder the wire to the connector. Sounds harder than it should be.
Id recommend fixing the connection upstream with a new connector. The area that broke bends and moves around when you pull the battery. Having the solder joint there will just break again shortly. Atleast in my experience…