With the advent of software- defined networks, network virtualization becomes a key technology to implement software-defined networks. Network virtualization requires a path computation element (PCE) to calculate virtual paths to connect virtual network nodes. The Dijkstra’s algorithm has been widely used in the PCE to calculate the shortest path between two virtual nodes. In this paper, we address that the Dijkstra’s algorithm cannot be applicable when a non-linear cost metric is used in the path cost evaluation. This paper proposes a new genetic algorithm (GA) to find the shortest path when a non-linear metric is used. The proposed GA generates the immigrants from ordinary chromosomes not from the elite chromosome for the genetic diversity. Also, the proposed GA does not use the sorting... process to replace the worst chromosomes. The proposed GA uses the random replacing mechanism to decrease the path computation time. Using simulations, we showed that the proposed method is better than existing algorithms.