Magento has a built in function for where to send 404s to, it is likely this is configured to send them to the home page.
In the admin panel, goto System -> Configuration then select Web under General on the left, and open up the tab Default Pages
There should be a CMS No Route Page, which is likely currently set to the Home Page, Change this to your desired CMS page and you should be fine. You may need to clear the cache before you see this change take effect.
Best Answer
You can do using plugin.
Create around method on
execute()
over classMagento\Sales\Controller\Order\History
and redirect to 404 page.Plugin Class