iPhone 3GS (jailbreak) not recognized in iTunes
The latest iTunes does not support as much older versions of iOS as iOS4 is. 

I recommend you to uninstall your current iTunes, clear cache ... etc., reboot your computer and then download and install an older version of iTunes. 

Once you are done with the above steps, I can recommend you to make sure that the USB port on your computer works well and to check the USB cable of the phone as well. Last thing that I can suggest is to have your iPhone unlocked and follow up if anything occurs on it's display. 

Let us know if any additional information is needed.