I've been battling this since I got my '03 two years ago, and its frustrated me to no end (including this morning when I was stuck in my driveway, which is why I'm on the forum now). I've heard that these trucks are notorious for having this problem, with the main reason being something about the hubs needing to be warm, or something like that (not really sure).
The only way I've had any luck getting it to engage is to stop, shift into neutral, shift into 4 Hi (or Lo), shift into Reverse with the wheels cranked one way, roll a few feet, then crank the wheels the other way still rolling, then repeat the process of going left and right for a few feet in Drive. The problem with this method is that it doesn't work when you're already stuck (like this morning, in my driveway).
If anyone has some insight as to why this happens, and how it can be fixed, it would be great. I'm tired of driving a 2WD truck that says 4WD on the side of it.