The local structure of correlated spin-orbit insulator Sr$_{2-x}$M$_x$IrO$_4$ (M = K, La) has been investigated by Ir L$_3$-edge extended x-ray absorption fine structure measurements. The measurements were performed as a function of temperature for different dopings induced by substitution of Sr with La or K. It is found that Ir-O bonds have strong covalency and they hardly show any change across the Neel temperature. In the studied doping range, neither Ir-O bonds nor their dynamics, measured by their mean square relative displacements, show any appreciable change upon carrier doping, indicating possibility of a nanoscale phase separation in the doped system. On the other hand, there is a large increase of the static disorder in Ir-Sr correlation, larger for K doping than La doping. Similarities and differences with respect to the local lattice displacements in cuprates are briefly discussed.