The diagram indicating that species D is more closely related to C than to A or B is B and C.
How to get the pedigree
The pedigree, also called a family tree, visually displays the phenotypes of family members, enabling analysis of specific genetic inheritance patterns within the family.
From this, it's apparent that the diagram suggests species D is closer in relation to C than to A or B.