Nikolas Cruz, who shot 17 students and staff members in Parkland, Florida, in 2018, has been sentenced to life in prison by a judge.