The people at any salvage yard can tell you that. They will look it up in the "Hollander" Guide. Those are huge and very expensive books that list every part for every car and truck model and year, with a code number. You look that code number up in the back of the book and it will list every application that used that part.
In this case there may be some stipulations. A specific set of brackets might be needed, or there could be different gear ratios, depending on the weight of the trucks or whether they had a trailer towing package that was factory-installed. This method works best to provide a list of vehicles you can look for in the yards.
If you already have a donor truck in mind, you can look up the part numbers for your old transmission and the one you have access to, on an auto parts store's web site. The problem here is if the numbers are different, you don't know why. One could simply have a mounting hole for something that isn't used or needed on your truck, but that is enough to warrant a different part number. Even if the numbers are the same, you might be expected to install or perform modifications as needed to make it work in your truck.
Be aware you can even run into problems if you find a replacement from the same year and model. Ford is famous for making numerous mid-model-year changes. When you visit the dealer's parts department, they will often ask for the vehicle's date of production, or the vehicle ID number. Both of those can be found on the sticker on the back of the driver's door opening.