Did you connect the motor properly for the input voltage supply (125V or 240V jumper in the motor termination cover) and the RPM speed coil taps your pump requires? These are often 3 speed motor replacements eventually used for 2 speed usage. Then you cap off the unused speed RPM coil wire. Did you verify that the pump shaft impeller shaft bearing is not seized up, and you are trying to spin up a seized up pump impeller shaft vibration coupling? There is a starter coil on these pump motors, the starting coil uses a centrifugal speed cutout switch in the motor by the wire cover to start the motor spinning, then the switch cuts out when the motor gets spinning under load. That's that little click sound you normally hear as the motor gets spinning up to speed.
Immediately you should pull the control box cover, you may be replacing a good pump motor if the control board relay for the pump motor speed coil taps has burnt up or if you see melted wires on the electrical heat tube control board connectors for the pump motor. Verify you have 230+ VAC on the pump motor speed relay outputs on a volt meter before just guessing it was a very pricey pump motor. I have seen control boxes where the chlorine has corroded the copper terminations to the point that the entire control board needed to be replaced and the wires were melted black with green corrosion on the terminations.
When you replace the cover on the control panel, make sure the seal is good. Chlorine is horrible and will eat at any copper wiring not sealed up from exposure using seal-tight flex and waterproof electrical box fittings. After checking all the wiring you will probably find a bad crimped on spade connection that has corroded and melted, then it's an easy fix.