Controlled-Z gate for transmon qubits coupled by semiconductor junctions