Regional ventilation in the injured lung is heterogeneous and frequency dependent, making it difficult to predict how an oscillatory flow waveform at a specified frequency will be distributed throughout the periphery. To predict the impact of mechanical heterogeneity on regional ventilation distribution and gas transport, we developed a computational model of distributed gas flow and CO2 elimination during oscillatory ventilation from 0.1 to 30 Hz. The model consists of a three-dimensional airway network of a canine lung, with heterogeneous parenchymal tissues to mimic effects of gravity and injury. Model CO2 elimination during single frequency oscillation was validated against previously published experimental data (Venegas JG, Hales CA, Strieder DJ, J Appl Physiol 60: 1025-1030, 1986). Simulations of gas transport demonstrated a critical transition in flow distribution at the resonant frequency, where the reactive components of mechanical impedance due to airway inertia and parenchymal elastance were equal. For frequencies above resonance, the distribution of ventilation became spatially clustered and frequency dependent. These results highlight the importance of oscillatory frequency in managing the regional distribution of ventilation and gas exchange in the heterogeneous lung.