Dear Hu,
You are using ns3::NakagamiPropagationLossModel which is not related to the the distance.
Distance are not taken into account because Nakigami is just a fast fading model.
When you create a WifiChannel, you can add one or more
PropagationLossModels. If you want just the attenuation due to
distance, you just add an appropriate path loss model (eg.
LogDistancePropagationModel, TwoRayGroundPropagationModel, etc). If
you also want to add fast fading, you can add a second model to the
channel (Eg. NakigamiPropagationModel).
Best,
Riyanto Jayadi