Before you crack the pan on your tranny and dig into the internals I'm going to assume that you have done a fluid/filter change and have already check your kick down linkage to make sure it is properly adjusted. If you have done theses already and your tranny is no better then read on!

If you Jeep came with a 4.0L engine and automatic then most likely the tranny behind it is a 42RE. This is the little brother to the 46RH/RE and though not as heavy duty still it is a tough transmission in its own right.
The E in 42RE is ELECTRONIC control. The Transmission Control Module (TCM) via a solenoid valve and a pressure sensor mounted in the valve body controls the governor pressure.
When it all works, is works great. But when there is a problem with a 42RE the usual suspects are the electrical parts associated with control.
Some of the most common symptoms are erratic shifts and downshifts.
You also might notice very sluggish performance when starting from a stop. This is usually because the tranny is starting in 2nd gear instead of 1st.
If these symptoms describe how your Jeep is behaving first check for trouble codes.
Cycle the ignition 3 times (leave it in the run position on the 3rd) and watch the OD light on the dash. The flashes you see are the codes for the TCM (NOT PCM that is the check engine light) if the codes are a 14, 21, 26; these are related to governor pressure sensor and solenoid problems. But you may have NO codes (a 55) that reveal any problem. That does not mean that there isn't an issue with the electrical internals of the tranny.
Ok, let’s take a look at the usual suspects.

If you drop your transmission pan and remove the filter (prepare yourself for a fluid bath) you should see this (from passenger side of vehicle).
This is the governor body with the pressure solenoid and pressure sensor installed.
To get to the 2 electrical parts you have to remove the governor body.
First things first though. Let’s take a look at the sensor and solenoid.

The solenoid is on the left and sensor on the right. The solenoid is backwardly compatible in all versions of the 42RE but there are 2 versions of the sensor.

There is a 3 pin and a 4 pin version of the sensor. The 3 pin is the early production and is the version in '93-'95 Jeeps (as a rule). The bad news is that this version is very hard to find aftermarket. You have to shell out $120 to the dealership for it. The 4 pin that you see here is the '96 and up version that is widely available from transmission parts distributors for around $40. I would suggest BEFORE you go parts shopping to pull your pan and disconnect the harness and look at what version is in your Jeep! I was surprised to find out that even though I have a '94 ZJ (should have the 3 pin) it had a 4 pin sensor installed. It had been converted to the later version sometime in the past or there was a later model 42RE installed.

To remove the governor body it is 2 hex bolts the same as the ones in the filter, and 4 bolts. First disconnect the 2 connectors, and then unbolt the governor body. (Careful with the gasket!) Carefully remove the governor body. Now that it is out the 2 electrical parts are not difficult to remove.

The metal shield holds the pressure solenoid in. Slide the shield forward, off the solenoid and remove it. The solenoid pulls out.

Take a look at this jewel. It is pretty common for the mesh filter to get clogged and cause problems. But these are not serviceable, just replace it.

The sensor is held in place with a spring keeper. Pop it out with a thin flat blade screwdriver. The sensor pulls out of the side.

Be sure that the new solenoid and sensor are lubed with fluid (o-rings) before they are reinstalled in the governor body.
As a rule these are replaced in pairs. Even if the trouble code says sensor problem, or solenoid problem, replace them at the same time!

Install your new parts and reinstall the governor body just like it all came apart. Hopefully you are replacing the filter also aren’t you?? Get a filter kit with a RUBBER pan gasket, not cork. The rubber is reusable.
It should take you 3 to 4 quarts of ATF+4. ATF+3 has been discontinued because ATF+4 exceeds its ratings. If all you have is ATF+3 you are OK. DO NOT put anything else into you transmissions. DEXRON of any type is NOT compatible with Chrysler 4-speed automatics!!! It is a MYTH that it ever was.
Disconnect and reconnect your battery so the TCM starts with default settings for the new parts. If the problem was the sensor and solenoid you should see a night and day difference in how your tranny shifts.
If you can get both parts from a distributor you can probably do this fix for under $100. But if you have to resort to buying these from a dealership expect them to be in the neighborhood of $120 each. Good Luck!

Additional notes:
There have been cases when all indications point to problems with the solenoid and sensor. But if you have a bad TCM or a bad wiring harness either external or internal to the transmission you can have the exact same symptoms and the procedure in this write-up will not fix the problem. You may want to be proactive when you purchase the parts for this fix. The internal wiring harness includes the overdrive and converter clutch lockup solenoids. You may want to replace ALL the electrical parts at the same time just to save yourself the hassle of cracking the transmission open again. (One fluid bath is enough!)

This is an updated version of this write-up. Only sight changes have been made to put more emphasis on important points.