Search for excited quarks of light and heavy flavor in γ + jet final states in proton–proton collisions at s=13TeV