Fix typing errors in torch.distributed.*, close issue #42967. (#47534)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/47534
Test Plan: Imported from OSS
Reviewed By: walterddr
Differential Revision: D24952497
Pulled By: xuzhao9
fbshipit-source-id: 063bfd0707198436fcfd9431f72f9a392bc0017e