Your '87 is a lowport engine with the Renix system. The head and manifolds are different from the HO engines ('91 and newer). The renix system has more and sometimes different sensors and actuators than the later types.
The heads are exchangable as far as I know, but than you need to get rid of the EGR and vaclines which in some states can be a problem in case of smog laws.
You need a lock from another '87 or '88 to fit the mechanism in the door. Later types do not fit as some changes were made. Or change the lock and mechanism as a set.
Jeep Cherokee model info and years