Can you install a 1996 4.0 in a 1990 Cherokee?

I put a 99 head and block in an 89.