Thermal management has become a promising field in recent years due to the limitation of energy resources and the global warming. An important topic in improving the efficiency of thermal energy utilization is how to control the flows of heat, and thermal rectifiers, such as the thermal transistor, have been proposed as units for modulating the flow of heat. In this work, a reconfigurable non-contact thermal transistor with two-dimensional grating is introduced. The thermal transistor consists of three parts: source, gate, and drain, with the gate working around the phase-transition temperature of vanadium dioxide, a type of phase-transition material. Results show that the unit has a clear transistor-like behavior. The surface phonon/plasmon polaritons supported by the insulating/metallic states that contribute to the radiative thermal transport can be modulated at a nanoscale separation. And the dynamic amplification factor ranges from 15.4 to 30.6 when the stretchable polydimethylsiloxane is subjected to tension or compression. This work sheds light on studies about the controllable small-scale thermal transport due to mechanical deformations.