Hi Kim,
As your description, you want the form to redirect to the appropriate library.
What did you mean that it redirected to a "Page Not Found" page if they clicked Close?
I am wondering what rules you used in the Submits button. Please try to add a Submit button, then set the Submit button to close the form after submit to check if this error displays.
If you want the form to redirect to the appropriate library, you can use JavaScript code to redirect to the page of the library.
Here is a similar post for your reference:
https://social.technet.microsoft.com/Forums/en-US/69839309-d6d9-4a25-9100-82b2393f9054/click-on-infopaht-close-button-redirect-to-another-page?forum=sharepointgeneralprevious
Thanks,
Wendy