If you are a DIY you could even try swapping these two oxygen wiring connectors as a first repair step, then clear the trouble codes and road test to see if the code returns. If it does not return then that was most likely the problem.
A next step would be to closely inspect the O2 wiring & connectors at the PCM end. Make sure wires are in the correct pin locations going into the PCM and it’s harness (refer to a vehicle specific repair manual for that). Be aware if there are swapped wires, damaged wires, etc. Repair as required.
If necessary, perform a continuity test of each individual wire from the PCM to the O2 sensor. Repair as necessary. If you have access to an advanced scan tool, use it to monitor (graph) the O2 sensor readings and compare to specs. PCM failure is kind of a last resort and isn’t always DIY friendly. If the PCM has failed, you likely should take it to a qualified technician for repair or replacement.