It has been observed that your charging port stops functioning because of the issues like the pins inside the port have been broken or if the phone has received some of the water/liquid damage in the recent past.

But nevertheless the issue is not so extreme that it cannot be resolved.
Let one of our experts replace your iPhone 3GS Charging port and within no time you will be able to sync your music and files.