Closed-form analytical solution to the temperature distribution inside a finite thickness body interacting with a moving Gaussian laser beam