Depending on if you've still got Apple support, take it to one of their stores. Alternatively, if you're technically handy, maybe look at some of the disassembly photos on the net and see what it would take to pop open the phone and look at the headphone jack assembly. Maybe there's a hole on the bottom you can push it out with, or you can buy a replacement headphone jack assembly.