A man was sentenced to more than 20 years in prison after police said he shot a 13-year-old girl in the head in 2025.