Enemies aren't going to individual locations Tower Defence

Long story short, I have a random map generator for a Tower Defence game. I am having some issues with the wave mechanic. The first enemy in the wave goes from start to exit while still following the road. The rest of them are just following the first one. Here’s the code for this:

private void MoveOnTheGrid()
        {
            if (pathCells != null && pathCells.Count > 1 && !enemyRunCompleted)
            {
                foreach (var enemy in WaveManager.listOfEnemies)
                {
                    currentPosition = enemy.transform.position;   //enemy.transform.position; 
                    nextPosition = new Vector3(pathCells[nextPathCellIndex].x + 0.5f, 1.5f, pathCells[nextPathCellIndex].z + 0.5f);
                    enemy.transform.position = Vector3.MoveTowards(currentPosition, nextPosition, Time.deltaTime * this.enemy.speed);
                    //enemies.

                    if (Vector3.Distance(currentPosition, nextPosition) < 0.05f)
                    {
                        if (nextPathCellIndex >= pathCells.Count - 1)
                        {
                            Debug.Log("Reached end!");
                            EndPath();
                            enemyRunCompleted = true;

                        }
                        else
                        {
                            nextPathCellIndex++;
                        }
                    }
                }
            }
        }

I am sure that the issue is because of the nextPathCellIndex that, once is increased, all of the enemies inside the wave are going to the same location. I have tried using a Dictionary instead of the “listOfEnemies” but I realised it’s not really useful.

Any ideas? Cheers!

Where is currentPosition, nextPosition and nextPathCellIndex declared? Please provide full script so we can help