Probably not. There was a Nissan TSB issued regarding the P0120 code (TSB# NTB98-024a) for 97 Pathfinders saying the code may be set by an inaccurate reading. The TSB instructed to replace the TPS with countermeasure part #22620-4P210 and adjust per the procedure outlined in the TSB. Also, if your Pathfinder has an automatic transmission, it instructs to also replace the TCM (transmission control module) with part #31036-1W260.
I would have to question the P0131 code, though, or the year of your vehicle. P0131 was not a code available on the 97 Pathfinder, but was on the 98 model year. There was a P0130 code for the 97 MY. If you have a 98 Pathfinder, the above info does not apply, although it is possible the the TPS is misadjusted or bad.
If you have a 97 with a P0130 code or a 98 with a P0131 code, there was a Nissan TSB for that issue, #NTB99-004B. This bulletin describe a poor grounding issue of the two EGI ground points located on the upper intake manifold. The fix was to clean the connections and run supplemental ground harnesses between those ground points to the front, right side of the right bank cylinder head. Needed are 2 bolts, Nissan #08146-8121G, 4 wiring clips #01552-00401KK (which 4 plastic tie straps could be used for substitute), and an overly expensive subharness #24075-0W060 (which can be made with some eyelet connectors and two lengths of 10g wire for a LOT cheaper). It could also be that you have an upstream O2 sensor on the right bank starting to fail.