If more than one enemy ties for being the closest (to the monster), the second priority is to focus on the enemy who is earlier in the initiative order (summons are focused on before the character who summoned them in this regard, even on the round they are summoned, and a character who is performing a long rest would be focused on last).