Your issue is very common. The problem is the replacement gearbox you received has the motor wired in reverse polarity from the original motor that came installed in your tank. In order to get it work they way it did, you need to reverse the polarity of the new motor (IE: swap the red and the black wire to a different position).
There are two ways to accomplish this. #2 is usually easier.
1. If you know how to solder you can desolder the motor connections, reverse them, and resolder the wires.
2. The other option is to use a pointy object, press down on the pin retaining hitch on the JST connector, remove the pin/wire from the white JST connector, and then switch it to the other side of the connector (IE: change the polarity).
I should do a video on this as so many people ask about it and the vids I just found all show the micro connectors that have the white release latch.