Most locomotives do use electric motors.
But they have diesel generators to run them. They use the electric motors because of the low-end torque, IIRC. For a locomotive to be EV, the battery pack would have to be multiple railroad cars worth. Who knows how many..