Using Distribution Coefficient to Determine Mass and Percent of Acid Extracted
You got it almost right ;-)

The distribution coefficient gives the ratio of equilibrium concentrations in a biphasic mixture.

It is crucial to realize that a caffeine concentration of $2.0\,\mathrm{g}$ in $200\,\mathrm{mL}$ of water is the initial concentration, but not the concentration after a single extraction step! The latter will be lower, since a part of the caffeine went into the organic layer.

It doens't matter whether you express the concentrations in $\mathrm{g\cdot L^{-1}}$ or $\mathrm{mol\cdot L^{-1}}$ since $K_D$ is a dimensionless constant.

$$K_D = \frac{{[\mathrm{caffeine}]_{\ce{CH2Cl2}}}}{{[\mathrm{caffeine}]_{\ce{H2O}}}} = \frac{x}{10-x}\ \mathrm{g\cdot L^{-1}} = 7.8$$

$$x = 7.8\cdot (10-x)\,\mathrm{g\cdot L^{-1}} = \mathbf{8.86} \,\mathrm{g\cdot L^{-1}}$$

Note that $x$ is the concentration in $\mathrm{g\cdot L^{-1}}$. In order to calculate the absolute amount of caffeine in the organic layer or the remaining amount of caffeine in the water phase, you have to consider the volumes.

By the way, there's an article by G.S. Klebanov, L.N. Mednikova, and A.D. Ovcharova on this topic: Extraction of caffeine from aqueous solutions, published in 
Pharmaceutical Chemistry Journal, 1967, 1, 221-223 (DOI).