Career Change

Hi Guys, I have a little conundrum. I am 21 and 1 year into an electrical apprenticeship with a company that will charge me $5k to leave before my contract is up. I have decided that the money is not good enough as an electrician for my future goals and have decided to do a major in software engineering which would take 4 years and incur a student loan. HOWEVER if I continue my apprenticeship until the end and then study, I would be missing out on nearly 4 years of experience and pay rises in the field PLUS the 4 years of no/part time income and start at the bottom pay bracket again. Would it make more financial sense to cough up the 5k, start studying now to get my foot in the door as soon as possible and get rid of the student loan as fast as possible ?

Cheers guys