The 18-year-old boy is accused of searching for IS-inspired terror material and ways to derail a train.