You will first need to open the speaker, which can be tricky. Look for seams and work gently. Sometimes screws can be hidden under trim which can be re-secured with snaps or adhesive. Once open go to Amazon and search “USB charge ports” or just “USB ports”. There are numerous selections with many having 10 or so different types in a box for under $15. Compare these with your own until you find one closest looking carefully at the wire attachment points.
Get best match and re-solder wires.
Attach the new USB with epoxy in line with the port slot taking care its depth allows connector access. Seal port and case with silicone adhesive if any original seals and/or attach devices were damaged. Any burring from opening can be lightly sandpapered as necessary.
Remember you started with broken and parts should be less than new unless you are just wanting to explore and learn!
Good luck!