A female sailor has been jailed for 18 months after sexually assaulting shipmates.