There was another thread about that plug:
http://www.toyota-4runner.org/4th-gen-t4rs/115204-mystery-plug.html
I don't thinks it's temp sensor becuase that is a two pin plug. And on my 03 its plugged in so I don't agree with the theory in the above thread. A theory I came up with is it's potentially for the alarm system...now hear me out.
As per the owners maunal, the alarm will sound if the hood is opened while its set. So I have a feeling that this plug goes to the hood latch. So it would make sense that it is left unplugged on non alarm equipped 4rs. It doesn't make sense that it would need 4 pins but thats the only theory I got.