In the underwater sensor networks, many of applications need to be aware of the position of the nodes. In the insecure environment, the misleading information can be transmitted in the network and disrupt the functions of the nodes. Thus, the design of the secure localization algorithms that are resistant against attack and able to achieve correct localization is required. In this paper, we consider a secure localization algorithm based on gradient descending approach with a selective pruning step to remove the misleading information in underwater environment. To improve localization performance, we modify the algorithm. In the proposed method, the ordinary nodes can cooperate together to reduce localization errors.