Yes, but keep in mind that leeks have a milder flavor, so adjust the amount accordingly.