It was really just by chance that Neil was the Apollo-11 Commander. The original order of manned Apollo missions. From Deke Slayton's point of view any of his Veteran astronauts from the Gemini missions could have flown the first lunar landing mission.
Apollo-7, Earth Orbit test of Apollo CSM-Commander Schirra
Apollo-8, Earth Orbit test of Apollo CSM and LM-Commander McDivitt
Apollo-9, Medium Earth Orbit test of Apollo CSM and LM-Commander Borman
Apollo-10, Manned CSM and LM Operations in Lunar Orbit-Commander Stafford
Apollo-11, First Lunar Landing-Commander Conrad
For the Apollo Missions their was a prime and backup crew. Normally the backup crew would rotate in as the prime crew 3 missions later. So whoever was the backup crew on Apollo-8 would be the prime crew on Apollo-11. In early 1968 NASA Leadership realized that the LM wouldn't be ready for Apollo-8 if it flew in December 1968. It was decided to eliminate the Medium Earth Orbit test of the Apollo CSM and LM and fly Apollo-8 to the Moon. McDivitt who had been working closely with Grumman still wanted to be on the first mission with the LM so the Apollo-8 and Apollo-9 crews swapped position. So the backup Commander for Borman was Armstrong and the backup Commander for McDivitt was Conrad so with the swap Armstrong jumped forward to Apollo-11 and Conrad moved back to Apollo-12. That is how Pete Conrad got hosed out of his position to be the first person to walk on the Moon.
FYI - Collins was also originally on the Apollo-8 prime crew. However he had a medical issue with his neck and he was rotated out and Lovell who was the backup CSM became the prime CSM. Aldrin was rotated to become the backup CSM and Fred Haise became the backup LM pilot. However Collins healed well enough that when it was time to select the Apollo-11 crew, Slayton named him the prime CSM. The backup Commander was Lovell, with Haise as the backup LM and Mattingly as the backup CSM. Without Collins having his neck issues the prime crew for Apollo 11 would have been Armstrong, Aldrin and Lovell.