That is going to be a very short driveshaft compared to others. If you keep searching and searching, you may find one close enough.
On measuring the shaft, find a shop that does it first. They will tell you how they would like for you to measure. It most likely will be cheaper for you to bring the slip yoke or flange to fit the transfer case, and bring the flange for the rearend. And then bring a shaft that is too long and they can cut that one down to fit.
If your transfer case has a flat flange, they will have to put a slip yoke in the shaft itself. It has to grow longer and shorter as you go over bumps in the road.
P.S. Depending on what the shop says, they may want you to install the slip yoke half-way in the the transfer case, and bolt the flange piece on the rearend, and measure from yoke to yoke. You will have to wait and see what they want.