Iterative method for the least squares problem of a matrix equation with tridiagonal matrix constraint