Yes it will work as I have done many swaps since the newer 4.0's you can find in a salvage yard have less miles then the older ones.
Here's a few things that you must do........
You must use your old fuel rail, injectors, upper intake, all sensors, and exhaust manifolds.
On the 96 and up 4.0's the fuel rail has a spacer between the lower intake and the fuel rail. Make sure to re-use the spacer and the new style longer studs.
You cannot use the new style injectors!!
Don't worry about the cam sensor in the rear of the block, you shouldn't need it on a pre 94 4.0.
The biggest thing on this swap is the flywheel, the newer 4.0 uses a 8-bolt flywheel the older, say pre-97, uses a 6-bolt flywheel. Still this is a very easy swap, just use the new style flywheel if its a manual or new style flex plate if its a auto.
Oh and don't forget you'll need to use your old thermostat housing as well since they went to a larger upper radiator hose on the 95ups.
In essence its a very easy swap. Very well worth the extra time. this should work on just about any pre 94 swap and or later. Just remember, you can go up with the 4.0 swaps but you can't go back. In other words yes to a 99 in a 91 but no to a 91 in a 99.
Later Doug904.
***EDIT*** I just saw that your in California, you will need to use the old camshaft position sensor from your orignal engine in your new engine. All California explorers had a CMP.