I Google'd: Which wire goes to which terminal of the solenoid?
The first result ("How To Replace a Dishwasher Inlet Valve") says, in
Step 5: "Identify which wire goes to which terminal before removing
That would lead me to think that it DOES matter which wire goes to
what terminal. Can you clarify?