Gosnell denied murderous intent, and asked to be convicted of manslaughter.
He also previously pleaded guilty to a charge of offering an indignity to a human body.
Today, Gosnell told the High Court in Christchurch that he would be appealing his conviction, saying he's not a killer and believes he can prove it.
"I'm not a murderer and I didn't murder Hayden Miles," he said, while apologising to the Miles family for raising the possibility of putting them through a re-trial.
"I made a wrong decision that night and the following morning, and I'll have to live with that for the rest of my life.
"I'm disgusted in myself for desecrating his body."
The court heard how he snapped when Hayden said Gosnell's then girlfriend, Nicolette Vaux-Phillips, was using him and didn't like him.
Vaux-Phillips witnessed the attack, and was sentenced last year to 12 months of home detention after admitting being an accessory after the fact to culpable homicide.
Evidence came from Vaux-Phillips as well as from Hayden's mother, Jacqueline Miles, police officers, forensic experts, and friends of Gosnell who saw the dead teen's body the next day.
There was a packed public gallery in court today to hear how long Gosnell would be jailed for, including Miles family members and friends, as well as some of the jurors who sat through the evidence.
It has been 652 days since grieving mum Jacqui Miles last saw her son, and ever since has been "living a nightmare that I can't wake up from".
"I'll never get to see Hayden grow up and become a man. I feel so robbed. My family is forever broken," she told the court in an emotional victim impact statement today.
She has been tormented by visions of her son's "gruesome and evil murder", which has her vomiting every day with the thought of how he died, she said.
For the last 18 months, Mrs Miles has been seeing a therapist, suffers panic attacks - as does Hayden's 20-year-old sister Alecia - and has depression.
"No sentence could ever be enough to compensate for Hayden's death. We have to live with these images," Mrs Miles said.
Alecia told Gosnell that she doesn't want to waste energy on hating him, that he will "always be a nobody, and will be forgotten".
Hayden's father Peter said he had been left "heartbroken" and living with an "indescribable pain", adding: "I wish with all my heart I could have taken Hayden's place that night."
The family found media coverage of the murder inquiry, and later trial, "extremely sensational and distressing", and they criticised the justice system for the pressures it put on them.
Before sentencing, Gosnell told Justice Lester Chisholm that he wanted to sack his defence counsel Craig Ruane, who represented him at trial, and that he also wanted to adjourn sentencing so he could appeal his conviction.
Justice Chisholm said it was his right to do so, but appointed Mr Ruane as an amicus to help the court continue with today's sentencing.
In sentencing Gosnell to a minimum non-parole period of 18 years, Justice Chisholm admitted that Gosnell had led a "difficult life", having been estranged from his family.
He has 60 previous criminal convictions, and spent much of the last 14 years in jail for what the judge called mostly "low level violence", including convictions for assault and domestic violence.
Justice Chisholm said Gosnell committed "extreme brutality, repeated over and over", with a total absence of mercy.
"You set out to be cruel. These were the actions of a bully in the ultimate extreme," he said.
The desecration of Hayden's body was "quite beyond belief", he said, highlighting the enormous impact it has had on family and friends.
Outside court, mum Jacqui Miles' sister Sandy spoke on behalf of the family to say how relieved they are the court process is now over.
"But no sentence would ever be enough for the inhumane, disturbing and cruel way in which Hayden's life was taken by the murderer.
"We are really thankful the judge has given as much as he can, but we believe that life should mean life in prison.
"Our family can now concentrate on rebuilding our shattered lives to some sort of normality and focus on the loving memories we have of our Hayden.''