If some of the creatures are illegal targets as Jugan's triggered ability tries to resolve, the original distribution of counters still applies and the counters that would have been put on the illegal targets are lost. They won't be put instead on a legal target.

Artwork
Loading artwork…
Jugan, the Rising Star
The List · #IMA-172 · EN
Nonfoil—Foil—
Card rules
Flying
When Jugan dies, you may distribute five +1/+1 counters among any number of target creatures.
5/5
The light of the rising star empowers the champions of tomorrow.
Rare · Illustrated by Filip Burburan
Format legality
Commander Legal
Duel Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Penny Legal
PreDH Legal
Vintage Legal
Alchemy Not Legal
Brawl Not Legal
Competitive Brawl Not Legal
Future Not Legal
Gladiator Not Legal
Historic Not Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Pioneer Not Legal
Premodern Not Legal
Standard Not Legal
Standard Brawl Not Legal
Timeless Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
You choose how many targets Jugan's triggered ability has and how the counters are distributed as you put the ability onto the stack. Each target must receive at least one counter.