Australia has named a distinguished military leader as its next governor general, who represents Britain’s Queen Elizabeth, the country’s head of state, ahead of an election in May.