It's hard to find a great apartment if you don't already live in NYC and know what you're looking for, so you'll probably only be in your first apartment for 1 year anyway. Living in Manhattan will give you a central base to explore the city, get to know your transportation options, and make trips to other neighborhoods around the city that you might be interested in moving to. You will also avoid locking yourself into a commute that might be longer/more variable/more miserable than you might originally understand.
At the end of your year in Manhattan, you'll be able to make a more informed choice about whether to stay, or to "upgrade" to a nicer place in Brooklyn, Queens, uptown Manhattan, Jersey City, or even the suburbs.
Queens off the M line.
Anywhere off the F line.
In general you want to use something like StreetEasy search that lets you specify search areas based on commute and subway lines.
On days when NJTransit wakes up on the right side of the bed...