The famous Minnesota Transracial Adoption Study looked at individuals, some with two black biological parents, some with two white biological parents, and some with one black biological parent and one white biological parent, who had been adopted into upper middle class white families. So, the environments were somewhat similiar for all of these groups. If genetics did not matter for the black-white IQ gap, we would expect IQ to be somewhat similiar for these different individuals.
At age 17, the IQs of each of these groups had their IQ measured. The adopted children with two black biological parents scored an average IQ of 89, the adopted children with two biological white parents scored an average of 106 IQ, and the adopted children with one biological white parent and one biological black parent scored an average of 99 IQ. So, to summarize, pure white children scored an average of 106, pure black children scored an average of 89, and half white and half black children scored an average of 99.
So, despite being raised in white upper middle class families, the black-white IQ gaps remained. This would suggest that genetics do matter for these IQ gaps. Granted, there are flaws with this study, but it is the only study that I know of that looked at kids at an old enough age for genes to fully express themselves for intelligence. Other studies typically looked at kids at too young an age to truly estimate the impact of genes.
I assume you're referring to the Minnesota trans-racial study. First off, even if we accept there are genetic differences (and obviously, there are some differences), the idea of equality is one of principle: equality before the law, etc. There are moral reasons to value equality as a right, regardless of the fact that humans are not biologically identical to one another.
Now, as to the scientific validity of the study, it has an obvious flaw: It does not account for pre-adoption confounders, such as early nutrition and other early environment factors.