Get Field is the wrong function to use here and that's why the Go to related records step is never executed and it always creates a new related record.
Assuming that your relationship is:
KnownPeptides::NP# = Transgenes::NP#
That If expression should be:
If [ Not IsEmpty ( Transgenes::NP# ) ]
And you just need Else, not Else If as the second part of this If Block.
And I don't see any reason to use a repeating variable for the ParentID like you do. Given the way that you use that notation, I don't see how $ParentID  which is what $ParentID references mean ever get a value since you are assigning that value to $ParentID[KnownPeptides::NP#] which is not the same thing.
But if you enabled "allow creation of records in this table via this relationship", your entire script could be reduced to a single line:
Set Field [ Transgenes::NP#; KnownPeptides::NP# ]
If the related record exists, the NP# field in the related record already has this value. If no related record exists, one is created. All in one script step.
using the one line of script (set field etc.) worked perfectly.