Is the new motor brushless or brushed and is the old motor brushed or brushless? A brushed motor has 2 leads, a positive and a negative (red and black). A brushless has 3.
If both are the same type and if they are physically the same, then you should be good to go.