11. In three-dimensional space, the volume of the geometric body formed by points whose distance from line segment $A B$ is no more than three units is $216 \pi$. Then the length of line segment $A B$ is ( ).
(A) 6
(B) 12
(C) 18
(D) 20
(E) 24
11. D.

In three-dimensional space, the geometric body formed by points whose distance from the line segment $AB$ is no more than 3 is two hemispheres with a radius of 3 plus a cylinder with a base radius of 3 and a height equal to the length of line segment $AB$.
Let $AB=x$. Then
$$
\frac{4 \pi}{3} \times 3^{3}+\pi \times 3^{2} x=216 \pi \Rightarrow x=20 \text {. }
$$