The stability and equation of state of quark matter are studied within both two-flavor and (2+1)-flavor Nambu-Jona-Lasinio (NJL) models including the vector interactions. With a free parameter α, the Lagrangian is constructed by two parts, the original NJL Lagrangian and the Fierz transformation of it, as L = (1 − α)LNJL + αLFierz. We find that there is a possibility for both ud nonstrange and uds strange matter being absolute stable, depending on the interplay of the confinement with quark vector interaction and the exchange interaction channels. The calculated quark star properties can reconcile with the recently measured masses and radii of PSR J0030+0451 and PSR J0740+6620, as well as the tidal deformability of GW170817. Furthermore, the more strongly-interacting quark matter in the nonstrange stars allows a stiffer equation of state and consequently a higher maximum mass (∼ 2.7 M ) than the strange ones (∼ 2.1 M ). The sound velocities in strange and nonstrange quark star matter are briefly discussed compared to those of neutron star matter.