* Transmission Type: Both trucks need to have the same transmission type (e.g., TH350, TH400, SM465, 700R4). If they have different transmissions, it won't be a direct swap.
* Engine Type: While the transmission itself might bolt up, the bellhousing (the part connecting the transmission to the engine) might be different depending on the engine. An '85 and '87 K5 could have different engine options, requiring a different bellhousing.
* Transfer Case: The transfer case interfaces with the transmission. While often interchangeable between years, it's best to ensure they are compatible.
* Output Shaft: The length and spline count of the output shaft must be correct for the transfer case.
In short: You need to identify the exact transmission in both vehicles. If they are the same, the chances are very good for a direct swap. However, it's always advisable to double-check the bellhousing and transfer case compatibility to avoid unexpected issues. A parts catalog or a mechanic specializing in older GM trucks can help you determine compatibility.