If the target creature is an illegal target as Eriette's Lullaby tries to resolve, it won't resolve and none of its effects will happen. You won't gain life.

Artwork
Loading artwork…
Eriette's Lullaby
Outlaws of Thunder Junction · #10 · EN
Nonfoil—Foil—
Card rules
Destroy target tapped creature. You gain 2 life.
When Kellan questioned her, Eriette reminded him that she'd been asked only to put the guard to sleep—the request said nothing about waking up.
Common · Illustrated by Anton Solovianchyk
Format legality
Brawl Legal
Commander Legal
Competitive Brawl Legal
Duel Legal
Gladiator Legal
Historic Legal
Legacy Legal
Modern Legal
Oathbreaker Legal
Pauper Legal
Pauper Commander Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
Penny Not Legal
PreDH Not Legal
Premodern Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions