If a villager leaves your town they will leave behind an empty plot, and you can use that to invite the new villager. Be sure you go talk to the villager you want to invite the day the old villager has left and the plot is empty though, as if you wait more than that you might get a random move-in instead.