This error happens when different Rules inside the same Target Permission have the same name.
This configuration is not valid in v14.0. In this version, these rules are extracted to a new element in the system called “Execution Plan”. Different rules inside a certain Execution Plan cannot have the same name. Therefore, when the upgrade process tries to create the Execution Plan according to the Target Permission configuration it will fail whenever different rules with the same name exist in the same Target Permission element.
Rollback the system to its original state before the upgrade and manually fix the name duplication. Then, run the upgrade procedure again.
You can execute the following SQL query on your Identity Portal database schema to find all Target Permissions that have multiple rules with the same name:
SELECT targetPermission_id, name, COUNT(*)
GROUP BY targetPermission_id, name
HAVING COUNT(*) > 1