My jeeps RPMs jump really high when it changes gears, and i took it to a mechanic and they told me that the transmission was fine. Could it be the oxygen sensor that controls the amount of air going to the engine?
NO. You may have a problem with the accelerator cable. Make sure the throttle body flap closes completely. Clean the throttle body. You may also have a problem with the temperature sensor for the ECU. If it is out of spec. it may be telling the ECU to make the mixture richer, making the vehicle idle higher.02 senors that throw codes are usually on the lean side.
I had a bad o2 sensor in my car too once. Make sure it isnt an electrical problem caused by a short. If your o2 sense is out, you might also be getting really really bad gas milage.