Nobody here works for NYU admissions so nobody can give you an answer with certainty. My guess is that having two years of foreign language will not automatically disqualify you but not having all the recommended HS coursework could put your application at a disadvantage. I would certainly give NYU a shot if it is your top choice.
If there is a reason you only took two years of foreign language (ex. that is all your HS offers) ask your guidance counselor to note it in your letter of recommendation. Note that you preferring to take other classes rather than foreign language is not a valid excuse.