You say the three wires FROM the discarded pump are all white. Why would that be of any consequence since you are discarding the pump?
Or did you mean that the three wires (from you 240V panel, presumably) going TO the discarded pump are all white?
If the latter is the case, disconnect
shore power entirely by pulling the "umbilical". Then inspect the wiring within the panel to determine which carry
power and which is the ground. Disconnect the wire from the pump switch in the panel and by means of continuity testing determine which of the feed wires at the pump site is that wire. Mark it.
In the panel find the ground stud. Continuity testing from there to the end of each of the remaining two wires at the pump site determine which is the ground. Mark it.
Now by deduction you will know that the as yet unmarked wire is the other "hot" between panel and pump. Mark it.
For marking, I like using short lengths of "shrink on"
insulation in the appropriate colours to make little "bands" that identify the wires. In this county,
Canada, the "hots" are white and black (or red), the "ground" is green. I believe that is also the case in the US.
So it I were in your shoes, I would insert a terminal block (if there isn't already one) at the pump site. I would mark the wires FROM the PANEL with a black band, a green band and no band. Working across the terminal block, green then connects to green, black to black and white from pump to unbanded white from the panel.
Hope that helps:-)
TrentePieds