Hi, I've seen a couple of those truck with the contact on the rear window that is broken. Remove the back door finish panel and if I remember, the 2 contacts will be on your left when you face the back door (opposite side of the truck). They are located on the lower part of the window, behind the metal sheet. If it is broken, you will see it, don't need to do any test. Replacement contact are available at your dealer.
I've also seen wires problem on the top part of the back door, maybe you should open the rubber protector to check for a broken wire if your third brake light dosen't always work.