A Pakistani man has pleaded guilty to a terrorism charge, saying it was a “morally reprehensible idea” to support the Islamic State group by plotting to kill Jewish people in Brooklyn.