Before he was sentenced, Mazzaglia heard denunciations from 13 friends and family members of his victim.
"I hope you are in solitary confinement for so long that you forget what fresh air smells like," an aunt, Rebecca Tyning said.
An uncle, Daryl Findlay, called Mazzaglia a "diseased soul."
Marriott, 19, of Westboro, Mass., a marine biology major at the university, disappeared in October 2012. During the trial, Mazzaglia's former girlfriend, Kathryn McDonough, testified that she helped him dump Marriott's body into the Piscataqua River in Portsmouth after he killed Marriott because she refused to keep playing strip poker.
At Thursday's hearing, Mazzaglia acknowledged getting rid of the body but said Marriott's death was accidental. He said he was "truly sorry."
"I did not rape and murder Elizabeth Marriott; however, I do understand the Marriott family's pain," he said.
Robert Marriott, the last member of the family to speak, showed a picture of his daughter, known as Lizzi, holding a frog she had rescued. He read a poem she had written about a hunter killing a swan.
"I wish that goodness would triumph over evil, but you are proof beyond a reasonable doubt that is untrue," he told Mazzaglia.
McDonough, who got to know Marriott because they both worked at Target, is serving up to three years for her part in the cover-up. Mazzaglia was ordered to stay away from her and the Marriott family, and to pay for mental health treatment for the family.