Droplet motion on solid substrates has been widely studied not only because of its importance in fundamental research but also because of its promising potentials in droplet-based devices developed for various applications in chemistry, biology, and industry. In this paper, we investigate the motion of an evaporating droplet in one-component fluids on a solid substrate with a wettability gradient. As is well known, there are two major difficulties in the continuum description of fluid flows and heat fluxes near the contact line of droplets on solid substrates, namely, the hydrodynamic (stress) singularity and thermal singularity. To model the droplet motion, we use the dynamic van der Waals theory for the hydrodynamic equations in the bulk region, supplemented with the boundary conditions at the fluid-solid interface. In this continuum hydrodynamic model, various physical processes involved in the droplet motion can be taken into account simultaneously, e.g., phase transitions (evaporation or condensation), capillary flows, fluid velocity slip, and substrate cooling or heating. Due to the use of the phase field method (diffuse interface method), the hydrodynamic and thermal singularities are resolved automatically. Furthermore, in the dynamic van der Waals theory, the evaporation or condensation rate at the liquid-gas interface is an outcome of the calculation rather than a prerequisite as in most of the other models proposed for evaporating droplets. Numerical results show that the droplet migrates in the direction of increasing wettability on the solid substrates. The migration velocity of the droplet is found to be proportional to the wettability gradients as predicted by Brochard. The proportionality coefficient is found to be linearly dependent on the ratio of slip length to initial droplet radius. These results indicate that the steady migration of the droplets results from the balance between the (conservative) driving force due to the wettability gradient and the (dissipative) viscous drag force. In addition, we study the motion of droplets on cooled or heated solid substrates with wettability gradients. The fast temperature variations from the solid to the fluid can be accurately described in the present approach. It is observed that accompanying the droplet migration, the contact lines move through phase transition and boundary velocity slip with their relative contributions mostly determined by the slip length. The results presented in this paper may lead to a more complete understanding of the droplet motion driven by wettability gradients with a detailed picture of the fluid flows and phase transitions in the vicinity of the moving contact line.