How do you fix a mp3 player if it only plays in one ear and it's not the headphones?

If the problem is not in the headphones, it is almost certainly in the headphone jack. Unfortunately, the resolution requires a willingness to crack the case and solder the circuit boards inside. Remove the battery; pop the case -- usually it will be held together by little plastic tabs, though in some very rare cases, more expensive units in particular, which will have tiny little screws, usually 00 Philips. Inside will be one or two circuit boards, and the headphone jack will be attached to one of them. There will be three or four solder tabs sticking out of the plastic body of the headphone jack, and soldered to the circuit board; often these tabs are all that holds the jack in place, it will be otherwise floating in a notch in the circuit board. With a solder iron, carefully heat and reflow each of the tabs. Re-assemble.