Equilibrium measure for a nonlocal dislocation energy