"Target is not a directory" is a cp error. It happens when you have three or more arguments, and the last argument is an existing filesystem object that isn't a directory!
Of course
cp a b
works if b is a regular file, and not a directory. b is simply replaced with a. But
cp a b c
means make a copy of a and b inside directory c.