After you setup your preferred version, it is necessary to check the redirection is working fine. Here is a free tool to check the redirection between www and non-www versions of your site is working fine. Simply, enter the domain name and click "Submit" button. The tool will check the redirection and confirm the status. Make sure the status is showing as "Good" indicating the redirection on your site is working fine.

Note: Earlier, Google Webmaster Tools (Search Console) offers an option to choose your preferred domain to show in search results. However, this has been removed now and Google will automatically find the available version based on your redirect setup. In addition, you need to submit XML Sitemap for your preferred version in Google Search Console and in other search engine's Webmaster Tools account.