You can use some upgrade (for example "Hero") and set it to 1, then set all heros, that they need that upgrade. When player gets a hero set this to 0, so he cant buy more heros.
Also you can, when player gets a hero just Disable availability of other heros (Player - Set Trainig/Construction availability of unit)