We have an issue with URLs and duplicate content on Shopify.
To clarify the issue when we add a product to certain collections, these collections create products and get indexed on Google.
This behavior is "by-design" and you cannot change it.
The best you can do is set the Canonical URL of 2. so that it points to 1.
There's not way to prevent that Google index both URL, but using Canonical URL you are giving to Google a clear signal that 1. is the preferred version.
Regarding Redirects in Shopify, they works only if the URL that you are trying to redirect doesn't exists anymore.
You cannot setup a redirect for a collection, a product or a page that is still defined, you need to delete it first.