Just did this on my '05 Liberty.
The switch is about 2 inches above the oil filter.
There is a red tab on electrical connector you have to push to one side. It will click when you push it. On the same side of the connector, there is a black release tab you have to squeeze fairly tightly, and the connector should pull out. I broke the tab on mine, trying to pry it in the wrong direction (away from the connector), and had to use a dentist hook to pull up on the clips that the release tab controls.
Once you have the electrical connector removed, it's time to unscrew the actual switch.
Using a pressure switch socket, a ratchet, and a 6-inch extention, I was able to unscrew the switch without removing any other parts (a little oil will leak).
Ratcheted the new sender in.
Threw some electrolytic grease on the connector, and reconnected it.
Now I'm waiting to see if P0522 code goes away