Preheat oven to 425 degrees F. Butter a 2-quart au gratin dish or shallow baking dish; set aside. In a Dutch oven cook fennel and sweet onion in a large amount of boiling salted water about 5 minutes or until softened. Drain well.
Spoon drained fennel mixture into the prepared au gratin or baking dish. Sprinkle with garlic, salt, pepper, and nutmeg. Drizzle with half-and-half. Sprinkle with Parmesan cheese. Dot with the 2 tablespoons butter.
Bake about 15 minutes or until butter is melted and bubbly. Sprinkle with walnuts. If desired, garnish with parsley.