Array signal processing is extensively utilized in the field of underwater acoustics (UWA). The majority of existing array signal processing algorithms require precise array position information to optimize their functionality. However, the intricate nature of the UWA environment introduces challenges such as the influence of water flow, which may result in deviations from the predetermined array positions. Consequently, this can amplify errors in array processing algorithms. Therefore, a high-precision array positioning method is needed to estimate the actual position of the array. The effectiveness of current array localization algorithms employing delay differential matching depends significantly on the accuracy of delay estimation and the formulation of the ambiguity function. In response to these crucial factors, this paper presents an algorithm for estimating array element positions that leverages an improved approach to delay estimation. Firstly, we propose the ρ-PHAT algorithm enhanced by the artificial fish swarm algorithm (AFSA-PHAT), significantly improving delay estimation accuracy, particularly in low signal-to-noise ratio (SNR) conditions. Compared to the traditional ρ-PHAT algorithm, this approach achieves a 3 dB increase in precision and a reduction in the root-mean-square error (RMSE). Additionally, a novel method is introduced for constructing the ambiguity function, which focuses on minimizing the acoustic complexity to encompass only direct and surface-reflected sounds. This improvement makes it particularly suitable for hydrophone arrays deployed near the sea surface. Computer simulations and experimental results validate that the algorithm, incorporating the aforementioned improvements, achieves enhanced accuracy in position estimation, reduced RMSE, and increased robustness.