I believe the switch is inside the latch mechanism. I've read that spraying some lube up into the latch mechanism inside the rear door can help.
When I went looking for the solution on my 98 I found the wire harness going from the rear hatch to the truck (upper left corner when you open your hatch, you'll see it). Inside that harness there were a few wires that broke apart over time or whatever. I just soldered them back together and my hatch light works normally now.
Has anyone created a mod where you can turn on rear cargo light & back seat light from switch placed close to front instrument cluster?