Wireless sensor networks can monitor the environment to detect anomalies and reduce the risk of maritime traffic. Energy is necessary for low-power conditions where wireless sensor networks are used. Ensuring the lifespan of energy constraints and providing continuous environmental observation, data collecting, and communication requires management. Battery replacement and energy consumption issues can be resolved with path planning and energy-efficient autonomous underwater vehicle charging for sensor nodes. The nearest neighbour technique is used in this study to solve the energy-aware path planning problem of an autonomous underwater vehicle. Path planning simulations show that the nearest neighbour strategy converges faster and produces a better result than the genetic algorithm. We develop robust and energy-efficient path-planning algorithms that efficiently acquire sensor data while consuming less energy, allowing the monitoring system to respond to anomalies more rapidly. Increased sensor connectivity lowers energy usage and increases network longevity. This study also considers the situation when it is recommended to avoid taking direct travel paths between particular node pairs for a variety of reasons. This recommendation is considered in this study. We present a strategy based on a modified Nearest Neighbour-based Approach from the Nearest Neighbour method to address this more challenging scenario. The direct pathways between such nodes are constrained within the context of this technique. The modified version of Nearest Neighbor-based approach performs well even in that particular situation.