If the dimensions are $4a\times 4b$, then one side will have $a+1$ posts (including corners) and the other $b+1$ (including corners).
The total number of posts is $2(a+b)=20$.

This diagram represents the number of posts around the garden.

We solve the system $\begin{cases}b+1=2(a+1)\\a+b=10\end{cases}$ to get $a=3,\ b=7$. Then the area is $4a\cdot 4b=336$ which is $\boxed{\textbf{(B) } 336}$.
~Edits by BakedPotato66
Carl decided to fence in his rectangular garden. He bought $20$ fence posts, placed one on each of the four corners, and spaced out the rest evenly along the edges of the garden, leaving exactly $4$ yards between neighboring posts. The longer side of his garden, including the corners, has twice as many posts as the shorter side, including the corners. What is the area, in square yards, of Carl’s garden?
$\textbf{(A)}\ 256\qquad\textbf{(B)}\ 336\qquad\textbf{(C)}\ 384\qquad\textbf{(D)}\ 448\qquad\textbf{(E)}\ 512$