Let $\mathcal{C},\mathcal{D}$ be categories and $C\in\mathcal{C}$. Consider the constant functor to $C$, $\Delta_C:\mathcal{D}\rightarrow\mathcal{C}$. In other to show that $(C,(1_{\Delta_C(D)})_{D\in\mathcal{D}})$ is a colimit of $\Delta_C$, is it necessary to assume that $\mathcal{D}$ is connected? Wouldn't it be sufficient to assume $\mathcal{D}\ne\emptyset$?
Let $\mathcal{D}\ne\emptyset$. For a morphism $d:D'\rightarrow D$ of $\mathcal{D}$, it is the case that $$1_{\Delta_C(D')}=1_C=1_C\circ1_C=1_{\Delta_C(D)}\circ\Delta_C(d).$$ This show that $(C,(1_{\Delta_C(D)})_{D\in\mathcal{D}})$ is a cocone on $\Delta_C$. Let $(M,(f_D)_{D\in\mathcal{D}})$ be another cocone on $\Delta_C$. Then for $(d:D'\rightarrow D)\in\mathcal{D}$ $$f_{D'}=f_D\circ\Delta_C(d)=f_D\circ1_C=f_D;$$ i.e. $f_{D'}=f_D$. Since $\mathcal{D}\ne\emptyset$, there exists $X\in\mathcal{D}$ and so $f_X:C\rightarrow M$. For $D\in\mathcal{D}$ $$f_D=f_X=f_X\circ1_C=f_X\circ1_{\Delta_C(D)}.$$ Let $m:C\rightarrow M$ be another morphism such that $f_D=m\circ1_{\Delta_C(D)}$ for $D\in\mathcal{D}$. Then $f_X=m\circ1_{\Delta_C(D)}=m$. This shows that $(C,(1_{\Delta_C(D)})_{D\in\mathcal{D}})$ is a colimit of $\Delta_C$.
Now, why does Borceux assume $\mathcal{D}$ is connected?
Note that in the case where $\mathcal{D}$ is the discrete category with two objects, the colimit is the coproduct of two copies of $C$ and so $(C, (1_C)_{D \in \mathcal{D}})$ is not the colimit.
The problem in your proof comes when you use morphisms $d: D' \rightarrow D$ to prove that for any cocone on $\Delta_C$, each $f_D$ is equal. As we saw with the discrete category, such morphisms might not exist in $\mathcal{D}$. And without those morphisms you get cocones whose legs can be different, which don't factor through $(C, (1_C)_{D \in \mathcal{D}})$.
Making the assumption that you've got enough morphisms in $\mathcal{D}$, to be able to prove that the legs of the cocone must be all the same, is exactly the same as assuming that $\mathcal{D}$ is connected.
(That is, you've assumed that between any two objects $D$ and $D'$ there is a chain of objects $D_1, D_2, D_3...$, where you can prove that each leg of a cocone to the object $D_n$ is the same for $D_{n-1}$ (because there is some morphism $D_{n-1} \rightarrow D_n$ or vice-versa))