You have more closing parenthesis, so ;
issue will be fixed if you will delete one.
end.next = new TwoWayNode<T>((T)(position.data).clone(), head, null);
For the other one, just replace this line
newHead = new TwoWayNode<T>((T)(position.data).clone(), null, null);
with this one.
newHead = new TwoWayNode<T>((T)((T)position.data).clone(), null, null);
This will prevent it to access the Object
class's clone() method, and will use your class's version (i.e. implemented by you) of clone()