This is an oft repeated lie. Blacks use narcotics at well over double the white rate. Claims that rates are similar are based on surveys, as opposed to test data.
Anyway, you are missing the point here that prosecutors know exactly who they're convicting. Sentences now are almost all plea bargains. They get serious criminals to plea out on narcotics charges rather than go to court and face the full set of charges and a 25 year sentence. They don't even bother prosecuting some kid with some drugs. This is how the system works. It may be problematic, but it's not as broken as naive people assume.