The door courtesy switch is SO EASY to replace, takes only 15 minutes! So hopefully if you have a faulty door open light showing up, it's because of the courtesy switch (the switch that detects whether the door is closed... if it's something further in your wiring, I can't help you there.
Faulty door courtesy switches can also lead to your car re-locking itself after unlocking as some people have mentioned in the comments, so this can be even more important than just an annoyance (for example, someone unlocked their car, tossed their bag in, walked away, and after a minute, the car relocked itself, since the car thought no one opened the doors!)
A few people have also mentioned in the comments that you can simply clean your switch to fix it, here's a
YouTube video about cleaning someone suggested.
Determining if the door courtesy switch is causing your door light to appear
Open a door one-by-one and locate the door courtesy switch - a little rubber knobby thing right where the door shuts onto the body of the vehicle. Try pressing it with your finger. Does your door light go off? That sensor's probably good. Try all of them - it's most likely that your driver door is faulty. In my case, just pressing it with my finger I could feel that something was wrong with it. It pressed in all janky, and sure enough depending on how I pressed it, I could make the light go off, or always stay on, etc.
Buy the part from Toyota
It's now called a "courtesy" switch, it used to be called a door jamb switch. The new part is part # 84231-32040. It costed $35.56 + tax from my Toyota dealership, you could probably get it much cheaper aftermarket or buying from a Toyota online parts store (although then you'd have to pay shipping). A few people have mentioned aftermarket switches seem to only last a year if placed in a commonly used door.
Remove and replace the switch! 15 minutes total.
Make space to access the pillar column on the interior of the car. Slide your driver's seat forward and lean it forward. Leave both driver's and back door open so you can access the door pillar trimming.
Pull off the door pillar trimming. Start from the top, and pull from the sides of the top. There will be three push-pins that pop out. That'll give you enough space to access the plug.
Unplug the old switch. There's a release lever on the top side of the plug, and it's pretty easy to pull out after you press that lever. Easiest switch I've unplugged!
Go to the outside of the vehicle, open your driver's door, and re-locate that rubber door jamb switch.
Pull the rubber up from the bottom. The bottom half of the rubber pulls up and flips up to reveal a bolt.
Unscrew the bolt with a 10mm socket.
Pull the switch out, while watching from the inside to see how the wire threads through the inside so you know how to replace it.
Thread the new switch's wire through that same path. You might have to bend the cable a bit to first slide it through the hole. Then insert the switch completely once wire pulled through.
Screw back on the switch. I just screwed it on tight.
From the inside, plug the new switch in.
Push back on the panel, all three pins should pop back in.
Done!
__________________
2000 Toyota 4Runner SR5, Manual Transmission,
OME 880/906 Lift, rear ARB air locker,
32" tires, stock 4.10 gear ratio