Savory Gruyère Bread With Ham

½ stick unsalted butter, melted and cooled, plus more for the pan
2½ cups all-purpose flour, plus more for the pan
1½ teaspoons baking powder
1 teaspoon fine sea salt
½ teaspoon baking soda
1 cup coarsely chopped ham
3 tablespoons thinly sliced scallions, white and green parts (optional)
1 tablespoon chopped fresh thyme leaves
2 cups grated Gruyère or sharp cheddar cheese
2 large eggs
1 cup buttermilk

Heat the oven to 350ºF. Butter and flour a metal 9 × 5-inch loaf pan and set it aside.
In a large bowl, whisk together the flour, baking powder, salt, and baking soda. Stir in the chopped ham, scallions if using, thyme, and 1¾ cups (7 ounces) of the Gruyère (reserving the rest for topping). In a separate bowl, whisk together the melted butter, eggs, and buttermilk. Add the wet mixture to the flour mixture and stir to combine. The batter will be thick.
Transfer the batter to the prepared loaf pan and spread it out evenly, smoothing the top. Sprinkle the remaining ¼ cup (1 ounce) cheese over the top. Bake until the top springs back when lightly pressed and a skewer inserted in the center comes out with some moist crumbs attached, 45 to 55 minutes.
Transfer the pan to a wire rack and let it cool for 10 minutes. Then remove the bread from the pan and let it cool completely on the wire rack.