You began reasonably, but then you went off the track. First, $D_4$ won’t work: it’s the Klein $4$-group, $(\Bbb Z/2\Bbb Z)\times(\Bbb Z/2\Bbb Z)$, which has three non-trivial proper subgroups, one generated by each of the non-identity elements.
Secondly, the fact that some integer $n$ divides the order of $G$ does not ensure that $G$ has a subgroup of order $d$, as noted in the comments. You do, however, have the first Sylow theorem available. (Note: This replaces the nonsense that I wrote originally.)
Finally, $4$ isn’t the only non-prime with only one non-trivial divisor: for each prime $p$, $p^2$ is such a number. You want at least the groups $\Bbb Z/p^2\Bbb Z$, or in your notation $\Bbb Z_{p^2}$, for all primes $p$. Can you identify exactly what the non-trivial proper subgroup is in each of these groups?