The 18-year-old was planning an attack on a school in the southeastern Podkarpackie region, authorities said.