Hi, #1 is completely unidiomatic. #2 is acceptable, although we commonly say 'a ship's captain' or 'a captain of a ship'. We normally occupy a position rather than execute it.
New words, one handy idiom, and a 2-minute quiz — delivered to your inbox to keep your streak alive.