I have a U.S. student visa (F1) with I 20, both are valid. I booked a ticket from Doha to Montreal, and I will have a layover in NY for about 5 hours. Although the purpose of my travel isn't to study in the U.S., I do have a valid student visa and I-20. I don't have a passport from a country eligible for the visa waiver program. Can I still transit in the U.S.?
A long-stay visa is superior to a transit visa, which means that as long as the visa and I20 remain valid, you can be admitted for transit as well.