It depends on the vehicle you have but new distributors cost around $100.00 and up.
So from around $100.00 you can replace the distributor or at least less than $200.00 to replace the distributor if you replace the distributor yourself if you know what you're doing.
Replacing the distributor will require you to get the distributor back in just the right place. And for you to get the timing correct.
So if you're not sure how to do this procedure then it's best to take it to a shop and have it done.
If you have it done at a shop it may come to $300.00 to replace the distributor when you factor in the labor costs and the hourly shop rates.