A migrant has been convicted of murdering his 15-year-old German ex-girlfriend and sentenced to 8.5 years in prison.