  Let $G$ be a finite group and $D_{2n}$ be the dihedral group of $2n$
elements. For a positive integer $d$, let $\mathsf{s}_{d\mathbb{N}}(G)$ denote
the smallest integer $\ell\in \mathbb{N}_0\cup \{+\infty\}$ such that every
sequence $S$ over $G$ of length $|S|\geq \ell$ has a nonempty $1$-product
subsequence $T$ with $|T|\equiv 0$ (mod $d$). In this paper, we mainly study
the problem for dihedral groups $D_{2n}$ and determine their exact values:
$\mathsf{s}_{d\mathbb{N}}(D_{2n})=2d+\lfloor log_2n\rfloor$, if $d$ is odd with
$n|d$; $\mathsf{s}_{d\mathbb{N}}(D_{2n})=nd+1$, if $gcd(n,d)=1$. Furthermore,
we also analysis the problem for metacyclic groups $C_p\ltimes_s C_q$ and
obtain a result: $\mathsf{s}_{kp\mathbb{N}}(C_p\ltimes_s
C_q)=lcm(kp,q)+p-2+gcd(kp,q)$, where $p\geq 3$ and $p|q-1$.
