Do yourself a favor... DO NOT get that engine from the YJ. Tthe wiring and everything is entirely different. You will be opening a can of worms and then some, believe me.
In order for it to work, you'd need the entire engine from the YJ, the wiring harness, the PCM, transmission, etc. The later...