The transmissions are different from 94 to 02 and won't interchange between the two. Are you sure it is a diesel trans for starters?
Your 94 has a 47RH, the 02 a 47RE. Look on what would be the drivers side of the trans above and a little forward of the rear cooler line. Pointing up will be a plug for the trans harness. If it has a round plug its a 47RE, if its a rectangular plug its a 47RH.