The FBI foiled the teenager’s plan to attack a grocery store or fast-food restaurant, the agency said.