Stop right now and get professional help.
You have ruined the bike fork and you are just one moment away from ruining your motor. You have already destroyed the outer wire insulation, wrap and yank on your wire a couple more times and you will damage it beyond repair.
Not meaning any offence but you clearly don't have the mechanical skills necessary to fix this yourself. As stated many times above, front hub motors if not done correctly have the potential to seriously harm or kill you. Your life is worth getting this done right. Take it to a shop and pay to have this fixed.
It's good to know when you are in over your head and get real help.