It is not known whether this problem is NP-hard, or whether it can be solved in polynomial time; apparently the question is open since the early 90s.
(The problem is also open for paths of length p mod q for any fixed p and q (fixed means they are constants, and are not given as input), whenever q>2. The problem is known to be in PTIME for 0 mod 2 and 1 mod 2, and to be NP-hard when the graph is directed. Pointers to related work here: https://gitlab.com/a3nm/modpath)