Destroy target land. Its controller may search their library for a basic land card, put it onto the battlefield, then shuffle.
Draw a card.
If the target land is an illegal target by the time Geomancer’s Gambit tries to resolve, the spell doesn’t resolve. Its controller doesn’t search for a basic land card and you don’t draw a card. If the target is legal but not destroyed (most likely because it has indestructible), its controller does search and you do draw.