I was getting the same error when trying to copy a file. Closing a channel associated with the target file solved the problem.
Path destFile = Paths.get("dest file");
SeekableByteChannel destFileChannel = Files.newByteChannel(destFile);
//...
destFileChannel.close(); //removing this will throw java.nio.file.AccessDeniedException:
Files.copy(Paths.get("source file"), destFile);