Will the 4.0 engine from a 1994 ford explorer work in a 1996 ford explorer?

Will the 4.0 engine from a 1994 ford explorer work in a 1996 ford explorer?

You'd be going from OBD to OBD II, the engines are about the same, but the 1996 might have sensors that the 1994 doesn't have provisions for.