There are 2 different 4.0 motors that Ford used. The 8th digit in the VIN will tell you which one it is. If it's an X it will be a pushrod motor, an E will be an overhead cam motor. I don't think they used a OHC motor in the '98 ranger but if that's what it is it will be easier to pull it out to change the heads and you will have to have special tools to setup the cam timing. Those heads are notorious for cracking and the cracks are sometimes difficult to detect.