* Transmission Type: The 1999 model year likely uses a 4L60E (or possibly a 4L65E depending on options). The 1997 5.7L truck may use a 4L60E, but it's also possible it has a different transmission altogether depending on the specific options. Even if both are 4L60E, there might be internal differences that prevent compatibility.
* Bolt Patterns: Even if the transmission type is the same, the bolt patterns for mounting to the engine block may be different between the 5.3L and 5.7L engines.
* Transfer Case: The 4x4 transfer case mating surface on the transmission will almost certainly be different, requiring a different transfer case.
* Computer Control: The transmission control systems are different and incompatible between the two model years.
In short, while the transmissions might *appear* similar, numerous details make this swap extremely unlikely to work without significant modifications (if even possible), potentially requiring extensive fabrication and custom parts. It would be far easier and more cost-effective to find a transmission specifically designed for the 1997 5.7L truck.