Dill has an unmistakable sour, but pleasant, taste. Dill seeds have a faintly nutty taste as well. What you substitute for dill seed depends on how it will be used. It would be difficult to use fresh dill to flavor pickles for example, but not such a challenge to use fresh dill in dips to replace dill seed.
Caraway seeds have a taste faintly similar to dill. While the resemblance to dill is faint, the actual taste of the seed is strong. Use in dishes to replace the strong taste of dill. Fennel, coriander and celery seed are all strongly flavored. Use on a 1-to-1 basis to replace dill seed. If the appearance of the dill seed is important but not the taste so much, replace with other small, mildly flavored seeds, such as sesame, poppy or even hulled sunflower seeds.
Fresh and Dried Dill Weed
The taste of dill is present in fresh and dried dill. Use about 1 tsp. dried dill and 1 tbsp. fresh chopped dill to replace 1/4 tsp. of dill seeds. Add to the dish, then adjust the seasonings by adding more if necessary.
Not much tastes more like dill than dill pickles. Chop finely and add to the dish. You could pour the liquid in the dill pickle jar through a sieve to find the dill seeds but their taste has been mostly transferred to the juice and the pickles. If you need just the dill taste, use a tablespoon or two of the dill pickle juice.
Commercial Pickling Spice
Pickling spice is a mixture of a number of spices including dill seeds. These spices flavor the brine for pickling but aren't meant to be added to dishes and consumed. Put a tablespoon or two of the spices in a square of cheesecloth. Tie closed and add to the dish while it's cooking. Remove before serving.