Supreme court upholds teenager’s 241-year prison term