I don't understand your explanation for why they says it's D but , then, I don't need to, as 'B, C and D' is a valid answer too/instead:
All of the shapes in set B contain some black dots.
None of the shapes in set A contain some black dots.
So shapes B, C, and D which all contain black dots all belong in set B is a valid answer. (and, of course, there can be many valid answers as long as the explanation is given).
(Originally I thought that all the shapes in set B contain black dots connected to at least one other black dot by a THICK black straight line,which would have made just shape C my answer,
but I think that are few of them fooled my eye and some black dots are only connected by slightly greyer lines).