Yep. It's the same block. Same motor, just a different intake. Take all of the external items off of your motor, pull the motor and replace with the '90.
Set your old motor to #1 piston at TDC, and the same with the new. So you can get the distributor in the new one easier.
'87 YJ, 4.2L built and bored, 8" of lift, 8.8 rear, AX15/NP 231J, Tom Woods drive shafts, Flat fenders, 12,000LB winch, Custom bumpers, Rattle can paint job. Never completed...