Looking to Purchase a 5.9...a few questions

Looking into purchasing a 5.9L engine locally and want to make sure I'm getting the right thing. At this point, the info I have is that it's a 5.9L out of a 97 van and is 8th digit Z. It is complete and is in the vehicle and running. Is this the correct engine for a swap?