"This is a difficult one, I would suggest taking it to a phone repair shop.
https://www.youtube.com/watch?v=ycER7MH6... - the link is a video on taking apart the phone itself if you wanted to attempt to repair this yourself.
I am not sure where you could buy a charger port, hence why i suggest a phone repair shop as they would have the equipment and hardware needed to repair this.
Sorry i couldn't be much help, but if this has helped you in any way please accept the answer or score the post.
Moto G2 charging port locates on the motherboard by soldering, so it is hard to replace it by DIY repair work, you'd better send it to the repair shop for help.
"My local phone / computer repair shop just confirmed for me that the solder used to connect the micro USB port to the motherboard is a higher temperature solder than what's used for the other components, intentionally to make it darn hard (nearly impossible) to replace this “wear item” in order to sell more phones.
This shop won't even attempted this repair any longer after several failed attempts and they consider themselves experts at micro soldering.
Sucks that phone companies have all figured out this dirty little bit of truth (that we are not surgically precise in our connecting and disconnecting our cords) and so they are getting away with building in and selling planned failure."