Stepper motors have two coils internally. There are 4 pins on the motor connectors. Not all motors have the same pinouts in those connectors. With a multimter check you have a low ohm reading, about 3ohms, between adjacent pins in the plug that goes onto your RAMPS board, if the 3 ohm coils are between pins 1-3 and 2-4 then that is your problem. Remove the wires from 2 and 3 in that connector and swap them over.
Sorry if this is too simplistic but it is better to start at the beginning.