The resistance in the ground path to the motor is bad. You must check to see if the grounds to the motor are good. It may be necessary to scrape off some paint to insure a good connection. You may have to add a ground strap between the motor and engine block.
The motor is NOT defective. There are some wiper motors that will not operate if the washer pump is defective. This may be the original motor problem. Bench test wiper motor and washer pump before replacing either.
Bench test the unit. If the unit operates properly, check the wiring harness ground, terminal ground lug or ground strap. If the motor still does not operate properly, check the switch and switch circuit.
It is common that installation of some motors require the use of the original connector. If the motor is running opposite of the original then the polarity must be reversed.