Metaheuristic optimization method for neutron spectra shaping