Anti-Knight Sudoku

It is a Sudoku variant with additional problems based on the moves of chess pieces. In this case, it is the move of the chess knight.

Anti-Knight Sudoku

Rules: In each cell of the NxN grid, enter a number in the range 1–N. Each number must appear exactly once in each row, column, and block.
Additional rules: The numbers in the distance of a chess knight move must not be identical.