!. Did you install the new impeller correctly?
2. Did you get the copper tube that connects between the upper and lower units of the outdrive in the correct location?
3. connect hose with muffs and remove the incoming water hose at the thermostat housing start motor and see if water is coming thru. then turn off motor. If no water flow to motor then you have a problem.
if it is then reconnect and start motor.
Why did you replace the motor? Details details details............................
There only a few reasons for a motor to get hot.
lack of water coming in, Typically bad impeller or blockage (possibly at the power steering cooler) or pinched water hose at gimbal housing or incorrect assembly at water pump impeller including pinched rubber tube gaskets at the top of the copper tube, There may be others but that is enough for now.
lack of water getting out, typically clogged exhaust elbows or restriction in exhaust possibly at gimbal housing
bad thermostat, stuck closed
bad temp sending unit
bad gage