I agree, it will bolt up no problem. I would, however, double check that the engine you are purchasing is a CJ 258, seeing as there is no such thing as an 87 CJ. Last one was in 86. If it is an 86 engine, there will be a ECM tucked under the dash you will have to deal with, shouldn't be too much of a problem, though. Just swap it and all the wiring over to the good CJ.
->'79 CJ7 (VIN Says it's a 5, wheelbase says otherwise), 6 inches of spring lift, awaiting an MC2100 on a teamrushed MSD'd 258
-->350 time. '95 block SBC, stroked to 383, dremeled heads and big 'ol intake, maybe a Holley 750 CFM, not sure yet
--->"Safety? Buy a Volvo. Never buy a CJ, or a Chrysler Jeep knock off, for safety, fuel mileage, reliability, handling, ride, comfort, aerodynamics, quietness, convience, stability, low maintenance cost, performance, or ease of use. The only reason to buy a CJ is because you are absolutely, incurably nuts." -OldTexas