Yes . . . and no.
The CNO has mandated that 2/3 of mids entering the USN must have technical majors. USMC doesn't care. And, history has shown (no pun intended) that history majors are more likely to make a career of the military (USN/USMC, at least) vs. any other major at USNA. (The source for this is USNA Admissions, so don't jump all over me
).
Med school applicants can also major in Oceanography. The key is getting Organic which is a 3-6-5 course (9 hours in class/lab for 5 hrs credit). Thus, unless you've validated a LOT of hours and/or have Organic as part of your major (Chem and OceanO do), it's not going to work b/c you don't have the time in your schedule to get that course and the others you need for med school.
It is true that most nukes are Group 1 or 2. Physics is very useful for nukes. I do know of some bull majors that went on to very successful careers as submariners (including 2 COs). But it is much more difficult -- you have to demonstrate the ability to handle the hardcore science.
As a general rule, your major is irrelevant to your service selection. As noted above, there are a few variations on that "general" rule.