Welcome Visitor! Please take a few seconds and Register
for our forum. Even if you don't want to post, you can still 'Like' and react to posts.
Well one of the three engines available in the 98 Explorer will be bolt in. The other two will not.
You would need an OHV 4.0 to have it bolt in. That would be the same motor as what you have.
The SOHC 4.0 will not bolt in (I would actually run away from one of that vintage). SOHC typically has that molded into the top of the intake.
The 5.0 will go in if you swap the transmission and AWD transfer case with it. You'll have to splice some wires and some other stuff, plus use the wiring and computer from the Explorer.
I don't remember offhand what the VIN codes are
You might have to swap things like intakes, exhaust manifolds, and senors, but yes, they are largely the same beyond that. I would stick to a 95+ in your case, because the heads and pistons are a bit different.
Also, if you get an engine from something with independent front suspension, instead of TTB, you may need to swap the mounting plates.