A Maryland teen was sentenced Wednesday to 10 years in prison, with all but one year suspended, for threatening mass violence and writing a detailed account of a character planning a school shooting.