Justin L. Casey, who changed his plea to guilty of one count of involuntary manslaughter, was given credit for 206 days served and will be subject to six months of mandatory supervised release.
He could have been sentenced to up to six years.
Casey shot Kyle R. Schultz, 27, in the head in their home in the 1100 block of Fourth Avenue on Feb. 19.
Police found Schultz about 11:30 p.m.; attempts to save him failed, and he was pronounced dead at the scene after midnight.
Casey and Schultz were among six people who lived in the two-story home, all of whom were friends and witnesses. There were no reports of anyone fighting that night, Detective Maggie Ellmaker said.