Wrong Z-Axis movement in G-Code
You could put the z endstop at the top, and flip the motor connector to make it move the other direction. This should make it home to the top near the nozzle, and then move downward during the print.

Otherwise, you'll have to tweak the firmware configuration and reflash.