Back in the 1960s it was a common practice for the networks to show episodes out of production order. This is why Nelson is shown wearing four stars on his collar instead of just three. There will be a future episode where he has three stars again, and one where his promotion to full Admiral is made clear.
This episode takes place in the 1970s.