To shorten the diagnostic time, ohm the connector to ECU and wiggle test at the same time.
Often, the harness will snag on a clip/tie wrap or whatever and ground the circuit fooling the ECU into a code.
Would not be the first time or the last time something as simple as that eludes a do it yourselfer.
I once chased a code for three days of shop time for such a problem.
So, again, I will repeat myself. If valve check out ok, and wiring checks out ok, suspect ECM.
If your so inclined to do so. Put a new valve in there. If code comes back. Wasted money.

Back to basics.