The man travelled more than 20kms and was detained under the Mental Health Act