The young man reached the court after slaying the girl’s throat in Dehradun