The correct diagnosis and early treatment of respiratory diseases can significantly improve the health status of patients, reduce healthcare expenses, and enhance quality of life. Therefore, there has been extensive interest in developing automatic respiratory disease detection systems. Most recent methods for detecting respiratory disease use machine and deep learning algorithms. The success of these machine learning methods depends heavily on the selection of proper features to be used in the classifier. Although metaheuristic-based feature selection methods have been successful in addressing difficulties presented by high-dimensional medical data in various biomedical classification tasks, there is not much research on the utilization of metaheuristic methods in respiratory disease classification. This paper aims to conduct a detailed and comparative analysis of six widely used metaheuristic optimization methods using eight different transfer functions in respiratory disease classification. For this purpose, two different classification cases were examined: binary and multi-class. The findings demonstrate that metaheuristic algorithms using correct transfer functions could effectively reduce data dimensionality while enhancing classification accuracy.