Welcome to the Microsoft Q&A Platform. Thank you for reaching out & I hope you are doing well.
I suggested,
- To create an "ApplicationGatewayFrontendPort", you can refer : Create the IP configurations and frontend port
- After creating, you must associate it to a listener and further associate this listener to an Application gateway : Create the listener and add a rule
You informed, your code snippet required you to use "Add-AzApplicationGatewayFrontendPort" and this resolved the issue.
Cheers,
Kapil