You'd need to verify the transmission part numbers and specifications for both the donor Envoy and the recipient Trailblazer to be certain they're compatible. Even if they appear superficially similar, differences in bellhousing bolt patterns, input shaft length, output shaft length, and other critical dimensions could prevent a successful installation.
In short: Don't assume compatibility. You need to do thorough research using the VIN numbers of both vehicles to confirm compatibility.