Sources say he was planning an attack in the New York City borough of Queens