That error is now fixed in https://github.com/discourse/discourse/commit/60790eb006eeaf288740bbfc3cc6eaa602179c13
Unfortunately, the Minio setup is currently broken, there are plans in the next few weeks to pull the SiteSetting s3_force_path_style that was introduced to support the Minio style urls.
Minio now supports the standard url structure that we use for S3. After the Minio-specific site setting is removed, the migration tasks will be tested and hopefully will work 
The migrate_to_s3 task will not work properly for Minio urls till this work is done.
