FWIIW, While not absolutely positive this is what I think. YMMV. Recommend doing your homework. Don't get rid of the original transmission before the job is done.
The 2003 F150 uses either a 4R70W or 4R100. There may also be differences in the gear ratios, DTR selector, and Tail shaft.
The transmission will bolt up as modular motors share a bolt pattern. There may be differences in the flex plate as differerent size torque converters are used depending upon the application.
There may be differences in the transmission harness as certain model years uses a turbine speed sensor in addition to the OSS sensor. Best to compare the wiring diagrams or re-use the original harness.
If there are differences in the DTR, likely possible to swap.
If there are differences in the tail shaft, likely possible to swap. However, some disassembly will be required. Note, if you keep the F150 tail shaft, likely there will be differences in the length of the drive shaft and yoke.
The question about the tail shaft could be easily answered by comparing the two transmissions.
Not sure if there are any differences in the gear ratios. And if they are different if it matters. For the F150 it would matter has the PCM controls the shift schedule to match the torque curve of the motor (important for towing applications).
If you are looking for a plug and play swap, I don't think this is it.
For a plug and play swap, likely you will do better with a car transmission from a similar MY Crown Vic, Grand Marquis, or Town Car. The differences are less with small details such as the direction of the DTR lever which is easy to reverse.
Or find a transmission from a Mustang. Recommending sticking as close as possible to the original MY. Remember that the 98 to 99 MY is a major change year for the Mustang. That is the year the Mustang switched from a VSS sensor to an OSS sensor.
Try car-part.com for a searchable list of salvage yards.
Be aware that arround 2003 or 2004, Ford changed the number of teeth on the OSS sensor. This affects the speedometer calibration when switching transmission into different MY's. The difference can be overcome with PCM programming. However, it's something to consider if looking for a plug and play swap.
These swaps should easy in theory but aren't always so. IMO, you should balance to cost vs risk of the swap vs having the original transmission rebuilt.
Remember, when using any salvage part, it may not be any better than the part that you have. While I am a firm believer in salvage parts, it's best to understand the risks.
Good luck.
<begin rant>
I wish these swap threads would include information regarding what kind of swap the OP is expecting. Some swaps are very possible if the OP has some electrical and mechanical skills.
It's important to know if a nearly "plug and play swap" is expected.
<Jumps off soap box. end rant>