From the Battle Primer (
https://www.games-workshop.com/resources/PDF/40k/warhammer_40000_en.pdf):
1. Choose Unit to Fight With
Any unit that charged or has models within 1" of an enemy unit can be chosen to fight in the Fight phase. This includes all units, not just those controlled by the player whose turn it is. All units that charged this turn fight first. The player whose turn it is picks the order in which these units fight. After all charging units have fought, the players alternate choosing eligible units to fight with (starting with the player whose turn it is) until all eligible units on both sides have fought once each. No unit can be selected to fight more than once in each Fight phase. If one player runs out of eligible units, the other player completes all of their remaining fights, one unit after another.