Looks like someone put a yj style shaft in. Hopefully it is still the stock yoke and the right double cardan shaft can go back in.
By the looks of that tcase it needs torn down and new seals. Probably new bearings too.
Does the tag on the back say np231j ?
Looks like it just say 231J, I have attached a photo of it too. Also, not sure about the YJ axle, I had no problems with it when in 4wd, just joint going out.. Because I have it down and out of the way I also am going to put in a cable shifter for the 4wd, right now it won’t shift into 4low, due to body lift. Please let me know what you think