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

Artwork
Loading artwork…
Makeshift Binding
Murders at Karlov Manor · #23 · EN
Nonfoil—Foil—
Card rules
When this enchantment enters, exile target creature an opponent controls until this enchantment leaves the battlefield. You gain 2 life.
Kaya clung to the cords of the barrier ward with all her might, trapping the thrashing dryad like a fly in a spider's web.
Common · Illustrated by Matt Stewart
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
Penny Legal
Pioneer Legal
Standard Legal
Standard Brawl Legal
Timeless Legal
Tlr Legal
Vintage Legal
Alchemy Not Legal
Future Not Legal
Old School Not Legal
PreDH Not Legal
Premodern Not Legal
Rulings
Published rulings from the downloaded Scryfall catalog. Source card record · Rules and interactions
If Makeshift Binding leaves the battlefield before its triggered ability resolves, the target creature won't be exiled, but you'll still gain 2 life.