In this paper, we theoretically investigate the transmission properties of a structure composed of a topological one-dimensional photonic crystal (1D PhC) heterostructure and a conventional 1D PhC containing indium-antimonide (InSb) as a defect layer using the transfer matrix method. The phenomenon of Fano resonance can be achieved by coupling the defect mode with the topological edge state mode, which is supported by the topological PhC. The numerical results show that a narrow Fano resonance is observed in the transmission spectrum of the structure in the presence of the external magnetic field applied to the InSb defect layer. The optical properties of the InSb defect layer, and, therefore, the Fano resonance, can be dynamically controlled by changing the applied external magnetic field. The results obtained with the proposed structure reveal that the magnetic field has the greatest influence on controlling the optical properties of the Fano resonance. These findings could be beneficial for optical devices such as optical filters, sensors, and optical switches.