The switch, which you can get at any dealer for under $20 is a re-designed model. I believe that it was re-designed for the 2004 model year and all previous years that use the same switch (to my knowledge it goes from 94-2006) are to use the new switch if they are to be replaced.
You must remove the lock mechanism in order to replace the switch. Once you have the door panel off, it looks like you can just reach in and change it, but that's not possible, so don't spend hours trying. You need to unsnap the retainer that connects the door-lock rod, the cable that leads to the interior handle, remove the electrical connector, and the the torx that hold the mechanism itself. It is somewhat difficult to get the mechanism out, you need to pull on the inside of the door while someone holds the outside, and pull it out. Once you have it out, remove the switch and the electric-lock actuator, and hit the whole assembly really good with break cleaner. When it is dry, lube the assembly well with lock lube (graphite based). Don't use grease or oil because it will/can make your locks hard to operate in extreme cold, and will "run" out in extreme heat. Lock lube won't freeze, run, or get gummy in extreme cold. Oil and grease will also attract dirt and debris where lock lube will not.
If you have a pre-2004, you probably also want to go ahead and replace the door-lock actuators if you haven't already. These to have been redesigned (far more extensively than the switch) and don't quit intermittently. If you have a pre-2004, and you have ever used your keyless entry to lock, unlock, lock, unlock (like you keep forgetting something or kids are playing with your locks), you might notice that your door-locks stop responding after the first or second cycle. That's why. And it can make for a nasty surprise when you find out someone robbed your truck overnight because you locked it with the remote and it didn't really lock. The new, redesigned actuators are available for ~$50.
If you ever have to replace one switch, or actuator, go ahead and do all of them. If you don't, odds are the other side will fail in a month or two anyway.
I recommend against using WD40 in your lock assembly. It will wash away the lube that was applied from the factory (which lasts about 10 years with normal use) and it's corrosion protection properties are horrible at best. And, probably more important, you can wash away the white lithium grease from your window tracks which will cause the rollers to wear out prematurely, or just cause them (and/or the linkage) to fail MUCH sooner than they would have otherwise.