Modify dishwasher water inlet valve or harness
I would remove the existing plug off the old one and fit it to the new one so it assembles correctly.

You should be able to identify which wire is where when comparing the old and new.

Edit update:
Remove the male plug on the harness.
Extend wires as necessary.
Purchase two crimp-on (insulated) terminals that fit the new pump, fit and test.