6. Given $G$ and $I$ are the centroid and incenter of $\triangle ABC$ respectively, $IC \perp IG$, $AC=2$, $BC=3$. Then $AB=(\quad)$.
(A) $\frac{3}{2}$
(B) $\frac{9}{5}$
(C) 2
(D) $\frac{11}{5}$
6. D.

As shown in Figure 6, let the line $G I$ intersect $B C$ and $C A$ at points $P$ and $Q$ respectively, and let $A C = b$,
$$
B C = a, A B = c \text{. }
$$

Since $I C \perp I G$ and $I C$ bisects $\angle A C B$, we have $P C = Q C$.

Draw $G D \perp B C$ and $G E \perp A C$ from point $G$, with the feet of the perpendiculars being $D$ and $E$ respectively. Then,
$$
G D = \frac{1}{3} h_{a}, G E = \frac{1}{3} h_{b},
$$

where $h_{a}$ and $h_{b}$ are the altitudes from $B C$ and $C A$ respectively.
Let the radius of the incircle $\odot I$ of $\triangle A B C$ be $r$.
$$
\begin{array}{l}
\text{Then } S_{\triangle G P C} + S_{\triangle G Q C} = S_{\triangle I P C} + S_{\triangle Q Q C} = 2 S_{\triangle I P C} \\
\Rightarrow \frac{1}{2} C P \cdot G D + \frac{1}{2} C Q \cdot G E = C P \cdot r \\
\Rightarrow \frac{1}{2} C P \cdot \frac{1}{3} h_{a} + \frac{1}{2} C Q \cdot \frac{1}{3} h_{b} = C P \cdot r \\
\Rightarrow h_{a} + h_{b} = 6 r \\
\Rightarrow \frac{2 S_{\triangle A B C}}{a} + \frac{2 S_{\triangle A B C}}{b} = \frac{12 S_{\triangle A B C}}{a + b + c} \\
\Rightarrow \frac{1}{a} + \frac{1}{b} = \frac{6}{a + b + c} \Rightarrow c = \frac{11}{5} .
\end{array}
$$