The Powertrain Control Module (PCM) on a 1997 Ford F-150 is typically located
under the dash, on the passenger side. However, it's not always in the same exact spot and might be slightly different depending on the specific trim level and options. You'll likely need to look behind the glove box or lower down on the passenger side of the dashboard.
It's a good idea to consult a repair manual specific to your 1997 F-150 for the exact location. A picture in the manual will be very helpful.