In Hungarian, both are 'paprika'. But because the pepper itself is common outside of Hungary, most languages already have their own word for the pepper, and so the loan word 'paprika' is only used for the less common spice.
In Hungary, it's relatively uncommon to need to distinguish between the ground form and the vegetable form, as it seems to be some kind of folk knowledge imparted by generation DNA or something, but if you ever do need to, then the expression fűszerpaprika exists (meaning 'spice pepper').
We use the same word for bell peppers and black pepper, so it's not that big of a jump, just takes some getting used to.