Provided that cavities are initially in a Greenberger-Horne-Zeilinger (GHZ) entangled state, we show that GHZ states of N -group qubits distributed in N cavities can be created via a 3-step operation. The GHZ states of the N -group qubits are generated by using N -group qutrits placed in the N cavities. Here, "qutrit" refers to a three-level quantum system with the two lowest levels representing a qubit while the third level acting as an intermediate state necessary for the GHZ state creation. This proposal does not depend on the architecture of the cavity-based quantum network and the way for coupling the cavities. The operation time is independent of the number of qubits. The GHZ states are prepared deterministically because no measurement on the states of qutrits or cavities is needed. In addition, the third energy level of the qutrits during the entire operation is virtually excited and thus decoherence from higher energy levels is greatly suppressed. This proposal is quite general and can in principle be applied to create GHZ states of many qubits using different types of physical qutrits (e.g., atoms, quantum dots, NV centers, various superconducting qutrits, etc.) distributed in multiple cavities. As a specific example, we further discuss the experimental feasibility of preparing a GHZ state of four-group transmon qubits (each group consisting of three qubits) distributed in four one-dimensional transmission line resonators arranged in an array.