Study of thermal SU(3) supersymmetric Yang-Mills theory and near-conformal theories from the gradient flow