An “immensely honoured” Vice Admiral has become the Royal Navy’s Second Sea Lord following a ceremony in Portsmouth.