Aiming at the cooperative localization problem for the dynamic UAV swarm in an anchor-limited environment, an adaptive Wasserstein filter (AWF) with distance-constrained bare bones self-recovery particles (CBBP) is proposed. Firstly, to suppress the cumulative error from the inertial navigation system (INS), a position-prediction strategy based on transition particles is designed instead of using inertial measurements directly, which ensures that the generated prior particles can better cover the ground truth and provide the uncertainties of nonlinear estimation. Then, to effectively quantify the difference between the observed and the prior data, the Wasserstein measure based on slice segmentation is introduced to update the posterior weights of the particles, which makes the proposed algorithm robust against distance-measurement noise variance under the strongly nonlinear model. In addition, to solve the problem of particle impoverishment caused by traditional resampling, a diversity threshold based on Gini purity is designed, and a fast bare bones particle self-recovery algorithm with distance constraint is proposed to guide the outlier particles to the high-likelihood region, which effectively improves the accuracy and stability of the estimation. Finally, the simulation results show that the proposed algorithm is robust against cumulative error in an anchor-limited environment and achieves more competitive accuracy with fewer particles.