The brake sensor (at the very top of the pedal behind the lower driver's console) can really mess with things, including not letting you shift gears, use cruise control, have functioning ABS, basically anything that uses your brake pedal as an input. If that one is going bad, it should be showing up as something like this: P0504 – Brake Switch Circuit “A” / “B” Correlation. It just means the signal coming from the two (redundant) switches inside do not match. This indicates that it's going bad or there's a bad electrical connection. Usually the former unless you've been hacking around under your dashboard.
Thankfully, sourcing the part is the hardest part about replacing it. The actual part number on the stamping was 56045043a, but I just called the local jeep dealer and asked for a brake switch for a 2005 KJ. It's apparently used on a LOT of chrysler vehicles:

The switch itself is pretty tame looking, has one plug, a plastic plunger, and an adjustment lever on the other end. Do NOT mess with the plunger or adjustment lever before installing. You'll have to go buy another one:

You can technically do the swap only by pulling down the snap-in "knee-panels" on either side of the steering column, but I chose to remove the lower panel too just to be able to get my hand in behind the switch. Two screws and a gentile tug from the firewall grommets is all you need:

With the knee-panel off, you can see the old switch plainly just to the left of center. To remove it, grab it firmly and rotate it about 45 degrees and slide out through the notched mounting plate:

There's plenty of slack in the cable to pull the sensor out and a slide-retainer and litle plastic flex-prong lets it slide right out:

Insert the new switch in the same slot as the old one and hold it up against the plate while you rotate it back into position. ONLY ONCE IT'S INSTALLED, turn the adjustment level so it's at a diagonal with the case of the switch (the included instructions explain this):

Once it's back in, pump the brakes a few times to ensure the plunger is making good contact, clear the code, and button things up. That should be that.
Dan
_________________

2005 Silver CRD Limited

245/75R16 GoodYear Duratracs
Fumoto drain | ProVent CCV Filter
Stanadyne FM100 filter | Cummins fuel pump
GDE Eco | SEGR | BoulderBars | FrankenLift | Frankenskids