Try use this code - it work for me:
b2DistanceInput *distanceInput = new b2DistanceInput();
b2DistanceProxy *proxyA = new b2DistanceProxy();
b2DistanceProxy *proxyB = new b2DistanceProxy();
b2SimplexCache *cache = new b2SimplexCache();
b2DistanceOutput *theDistance = new b2DistanceOutput();
proxyA->Set(fixtureBody1->GetShape(),1);
proxyB->Set(fixtureBody2->GetShape(),1);
distanceInput->transformA = body1->GetTransform();
distanceInput->transformB = body2->GetTransform();
distanceInput->proxyA = *proxyA;
distanceInput->proxyB = *proxyB;
distanceInput->useRadii = true;
cache->count = 0;
b2Distance(theDistance, cache, distanceInput);