I Had to do the same thing because of a security scan too.
Here is my solution, do this on your web.config file. In my case I had custom html pages for error codes, witch I believe is a good practice.
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
<system.webServer>
<directoryBrowse enabled="false" />
<httpErrors errorMode="Custom">
<remove statusCode="404" />
<error statusCode="404" path="/physical_path_to_your_custom_404_page_relative_to_the_web.config_file/404.html" responseMode="Redirect" />
<error statusCode="403" subStatusCode="14" path="/physical_path_to_your_custom_404_page_relative_to_the_web.config_file/404.html" responseMode="Redirect" />
</httpErrors>
</system.webServer>
</configuration>
With that, both the real 404 errors and 403.14 (.14 is the specific code for reaching a real path but with browsing denied) errors will redirect to a 404 error page. There will be no 403 to be seen, so for the end user both are 404 errors.
edit: you may need to install the "http errors" feature for this to work.