Modifying molecular structure is an effective strategy to enhance the gating efficiency of an organic single-molecule field-effect transistor (FET). In this work, we investigate the gating performance of molecular devices incorporating a five-membered heterocyclic ring with two heteroatoms, and (, O, or S, ) positioned at 1,3-sites. Our results reveal that both the chemical identity and spatial arrangement of the heteroatoms significantly influence device performance. When the five-membered ring connects via C2 and C5 positions, the device based on an imidazole ring () exhibits the highest sensitivity to external gate voltage, resulting in the largest on/off current ratio. Upon alteration of the linkage to the C2 and C4 positions, equivalent to changing the relative positions of the heteroatoms, the gating efficiencies of all devices are further improved. In particular, the thiazole-based device () demonstrates a more than eightfold increase in the on/off current ratio. An electronic structure analysis attributes this enhancement to the emergence of destructive quantum interference between the highest occupied molecular orbital and the lowest unoccupied molecular orbital, giving rise to a pronounced transmission dip. Under appropriate gate voltage, this transmission dip approaches the bias window, leading to a substantially suppressed off-state current. These findings offer theoretical insights for the design of high-performance single-molecule FETs through the targeted incorporation and positioning of heteroatoms.