In boron neutron capture therapy (BNCT), the ratio of the fast neutron flux to the neutron flux in the tumor (RFNT) must be less than 3% If a D-T neutron generator is used in BNCT, the 14 MeV neutron moderator must be optimized to reduce the RFNT. Based on the neutron moderation theory and the simulation results, tungsten, lead and diamond were used to moderate the 14 MeV neutrons. Satisfying RFNT of less than 3%, the maximum neutron flux in the tumor was achieved with a three-layer moderator comprised of a 3 cm thick tungsten layer, a 14 cm thick lead layer and a 21 cm thick diamond layer.