Help with custom portals

hey i need some help. I'm making a custom portal datapack and it was working but then i changed it so it generates the portal on the world surface in the other dimension and now i cant get the player to teleport despite the portal being placed in the correct location in the other dimension. this is what i have so far
Continue to help post