$$\{ a^{k}b^{j} : k = 2j , k \geq 0\}$$
I'm trying to wrap my head around CFG's but I am having trouble. From this language, there should be twice as many a's than b's. Here is my attempt.
$$S \to aSb \ | \ a Sa \ | \ \epsilon $$
$$S \Rightarrow aSb \Rightarrow aaSbb \Rightarrow aaaSabb \Rightarrow aaaabb $$
But, I can also have this arise, which I don't want: $$S \Rightarrow aSb \Rightarrow aaSbb \Rightarrow aabb $$
How can I force the CFG to put twice as many a's as b's? Is there any general approach to solving these?