The ability to connect distant qubits plays a role in quantum computing and systems candidates for quantum computation must be able to interact their constituent qubits. We model the quantum dot spin qubits by a spin chain with nearest-neighbors interaction. Within this model, we interact distant qubits by consecutive SWAP gates. The SWAP gate exchanges the information of two different qubits and it is obtained by a time-dependent pulse. Also, we implement the CNOT gate, which is fundamental to universal quantum computation. These gates are applied in a system free from decoherence, which provides a fidelity with high accuracy. Furthermore, we analyze the situation where dephasing, amplitude-damping, and depolarizing types of errors occur in each site of the chain. We found that the order of the SWAP and CNOT gates is important and it can lead to a relevant difference in fidelity when the number of qubits is large.