Once a battalion ability has triggered, it doesn't matter how many creatures are still attacking when that ability resolves.

Artwork
Loading artwork…
Boros Strike-Captain
Ravnica: Clue Edition · #25 · EN
Nonfoil—Foil—
Card rules
Battalion — Whenever this creature and at least two other creatures attack, exile the top card of your library. During any turn you attacked with three or more creatures, you may play that card.
3/3
"Keep up with me, comrades, or I cannot guarantee you a fair share of the fracas."
Rare · Illustrated by Alexander Forssberg
Format legality
Commander Legal
Duel Legal
Legacy Legal
Oathbreaker Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Modern Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
Pioneer Not Legal
PreDH Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
Similarly, once you attack with three or more creatures in a single turn, you can still play the exiled card that turn no matter what happens to those creatures.
If Boros Strike-Captain leaves the battlefield, the effect allowing you to play the exiled card if you attacked with three or more creatures continues to apply, even during later turns, as long as you attack with three or more creatures during those later turns.
The three attacking creatures don't have to be attacking the same player, planeswalker, or battle.
You pay all costs and follow all normal timing rules for a card played this way. For example, if the exiled card is a land card, you may play it only during your main phase while the stack is empty.