Hi stevew711 ,
Judging from your description of the problem, there are two likely possibilities:
# You may have a piece of debris lodged inside of the headphone jack. Dust, pocket lint, and other unwanted materials seem to have an affinity for headphone jacks and charging ports. If the stereo connector for your headphones doesn't go all the way down into the headphone jack, debris is the likely culprit. It would be worthwhile to use a small LED flashlight to look for any foreign material.
# If the stereo connector goes all the way down into your headphone jack but feels loose, you may have a bent or broken contact on the inside of your headphone jack. Unfortunately, the headphone jack is soldered to the logic board, making a replacement difficult. It ''might'' be possible that the headphone jack itself is loose and has been pushed down into the device far enough to prevent your headphones from connecting. If this is the case, you should be able to see a gap upon closer inspection. You can use the [guide|16753|Logic Board Assembly Replacement|new_window=true] guide to gain access to the interior of your device.
Hopefully, this helps.