Is your cart a Marathon? If I remember correctly it is.
I would check the pot box...
With key off and the cart in neutral remove the small black and white wires from the pot box to the controller. Measure the resistance between the black, and white wires with an ohm meter. It should be at 0 ohms and smoothly rise to about 5.0-5.5K ohms at full throttle.
If the reading jumps suddenly as you slowly push the pedal the potbox is bad or needs to be adjusted.