First we need to clarify whether you intend to enlist or become an officer. Since you already have a bachelor’s, the officer route is possible, though by no means guaranteed. That choice drives a lot of other factors.
An officer who makes it clear that (s)he’s only there to get that advanced degree and then split will almost certainly not treated as a real comrade by his commander. An officer is expected to be there for the long haul. In the enlisted ranks, that’s true as well but to a lesser degree.
However you choose to do it, by the time you finish the degree and whatever additional time is required, you’ll likely end up with at least 6 years invested in the military. Each year that passes makes it that much more difficult to leave because that 20-year retirement gets to looking more and more attainable. My observation is that anybody who stays past 6 years is in for 20. I do know of people who got out later, even one with 18 years in, but that’s pretty rare.
Regarding jobs, I can only speak for the AF but I assume the system is similar in other services. If you enlist, you can be given a guarantee of a particular field. That guarantee is contingent of course upon your meeting the qualifications and requirements. That sounds simple and it usually is but there are some potential gotchas. If you are assigned to a class starting a few days after completion of basic, you have to complete basic on time – a short illness or injury that holds you back a few days could mean you miss the start date of your other class. After that, you may be able to get into the next class in that field or you may not. If not, you’ll likely be assigned to whatever skill is needed at the moment. Likewise if you should flunk out of the seconday training, tech school in AF talk, (and that’s considered a bad thing) you’ll again be put wherever they need someone. If the particular job you want requires a high clearance and you don’t qualify, same rules apply.
If you are able to go the officer route, the process is similar but there is somewhat more of an effort to meet your preferences.
For specifics, you don’t mention what kind of job you’re interested in. I’ll assume psychology and there just aren’t that many actual jobs in the military that call for a psychology degree, except psychologists. There are a few like drug/alcohol abuse management, but there just aren’t that many of those.
For some of your specific questions: Only the Army has the two or three-year enlistment options and I think those have been done away with in the last few years. For the other services, four is the minimum. After that, it’s four-year increments. In the AF, you probably won’t be allowed to take other classes until you’ve completed your initial AF training (basic, tech school, and 6 months to a year of on-the-job training). That leaves a little over two years to do a masters part time. That’s doable but it’s tough. Another factor that comes into play include where you get assigned. At a small base, there might not be a graduate program available in your field but there may be in something else. If you want a program that allows you to go full-time at service expense, they’ll expect you to make up that time double – if it takes two years to finish the degree, you’ll have to serve at least four more afterwards.
This probably all sounds pretty negative but there are a lot of rewards that come with military service. There’s travel, a sense of belonging to a family, and the chance to do a job that’s a bit more meaningful than just helping some corporation’s bottom line. Flexibility is the key.
As far as which service, I can definitely recommend the Air Force. Don’t even think Marines if school is your primary goal. They’ll be happy to take you but you’ll probably be miserable. In the Navy, you’ll very probably be on a ship and that can severely cut into educational opportunities. They try to support education, but there’s only so much that’s possible in thise circumstances. I’ll let somebody else talk about the Army.
If you know somebody who is or was recently in the service, talk to them about it.