Arduino won't upload

Open the IDE.

Click FILE

When file opens try looking near the bottom where it says "Preferences"
That will open a new panel with the "Preferences" in it.

TICK the one for UPLOAD.

Although I dont think we are going to see much more as we know it fails at almost the final hurdle.

It is almost as if the bootloader is somehow corrupt but I don't know how you may have done that.