If the park pin switch tests OK at the 2P connector, there is a break or short in the wire between shift lock solenoid/park pin switch/A/T gear position indicator panel light connector and the 2P connector.
Replace the shift lock solenoid;
the shift lock solenoid is combined with the park pin switch harness and the indicator panel light harness/socket, and supplied as an assembly.