Your use of GFCI is highly correct
Electric-shock drownings are an epidemic in the U.S. This is when someone goes dockside, or to a pond, or in a fountain, and is shocked by leakage current. Often, this takes out their rescuers, too, in a tragic daisy chain until a rescuer arrives who realizes this is an elecricity problem AND has rubberized waders OR knows how to shut off the power. By this time, the people in the water have drowned.
So you are absolutely correct to get this under GFCI protection. As it happens, your GFCI immediately tripped because you do, in fact, have a ground fault. I suspect you had always been one simple "loose wire" away from catastrophe, but now you have caught that.
The GFCI-end wiring is correct. The only error is that 240V is supplied as 2 hot wires, and since you are tasking the white wire to carry "hot", you MUST re-mark it a hot color - black is fine. Spiral of electrical tape, sharpie, shrink tube... whatever. In reverse order of durability.
Bootlegging neutral for the timer, not so correct
Neutral is not ground. That is an axiom you must memorize. Neutral and ground must be kept separate at all points past the main disconnect switch (typically main breaker).
The timer you specified is a 120V timer. Here's how it was already wired:
- Timer ground to ground
- Timer HOT to one of the two hot wires that provide the 240V
- Timer NEUTRAL to ?????? (you did not say)
Most of us know what was done. Neutral does not exist in the box since you are using the /2 cable for both hot wires.... so timer NEUTRAL was bootlegged off safety ground. That will "work" as long as nothing goes wrong. If something goes wrong, it will electrify the timer chassis, and the water, and everything connected to the water. So... bad plan.
It's tripping the GFCI because the timer's current is coming off a hot and being returned to ground.
You are at an impasse.
To continue using this model of timer, you will either need to trench /3 cable from the house (no thanks), or install a transformer to provide a locally derived service here (and have the inspector approve that). It can be quite small - just a few watts as it only needs to power the timer motor.
Or, you can replace this timer with a 240V model which draws hot and hot, and does not need neutral.