It sounds like an issue with the charging port, assuming you've tried a different cord to verify that it's a problem with the port and not the cord.
Try cleaning the port with, say, some 90% or higher concentration isopropyl (rubbing) alcohol, a toothpick and an eyeglass cloth. You can also attempt to blow it out with compressed air or vacuum it.
So if you're still not having any luck with it, sounds like you would need to replace the charging port. Unfortunately on your phone it's mounted directly on the motherboard, so replacing it would require soldering. You would need moderate soldering skills; it's not quite microsoldering but close. Here's a picture of the bottom side of the motherboard, that the port is mounted on.
If you're not confident in your soldering skills, this shouldn't be a difficult replacement for a decent repair shop. Of course, you could simply replace the whole motherboard; I saw one on eBay going for about $12 USD, not counting shipping. Here's the guide you'd need to pull the motherboard either for repair or replacement.
Samsung Galaxy S II T989 Motherboard Replacement - iFixit Repair Guide
crwdns2934105:0crwdne2934105:0
crwdns2934113:0crwdne2934113:0
crwdns2915270:0crwdne2915270:0
crwdns2889612:0crwdne2889612:0
0