A very common issue with all 4WD transmissions is that the output shaft oil seal between the transmission & transfer case leaks. Its not a matter of if it will happen but when. It just wears out.
The oil can migrate either way; sometimes from the transfer up to the transmission, sometimes the other way.
When the oil migrates from the transmission to the transfer, the transmission can get extremely low on oil and the transfer case can get way overfilled.
You wouldn't see any oil dripping on the outside and everything would look fine (on the outside).
But as the transmission is run with insufficient oil for long enough, it begins to overheat parts and grind itself to death. All those little metal particles that grind off due to insufficient oil, mix in with what's left of the oil and create a slurry of abrasive metal particle contaminated oil that grinds up the transmission and oil seals at a faster & faster rate... until the thing bonks.
So although this may not have been the cause of your transmission failure, make a habit of regularly checking the fluid levels on your NEW transmission, so the above scenario never happens.