If the target creature is an illegal target as Riverwheel Sweep tries to resolve, it won’t resolve and none of its effects will happen. You won’t exile any cards.

Artwork
Loading artwork…
Riverwheel Sweep
Tarkir: Dragonstorm · #219 · EN
Nonfoil—Foil—
Card rules
Tap target creature. Put three stun counters on it. (If a permanent with a stun counter would become untapped, remove one from it instead.)
Exile the top two cards of your library. Choose one of them. Until the end of your next turn, you may play that card.
Uncommon · Illustrated by Wayne Wu
Format legality
Alchemy Legal
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Future Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Vintage Legal
Old School Not Legal
Pauper Not Legal
Pauper Commander Not Legal
Penny Not Legal
PreDH Not Legal
Premodern Not Legal
Tlr Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
You pay all costs and follow all timing rules for cards played this way. For example, if the chosen exiled card is a land card, you may play it only during your main phase while the stack is empty.