They are mostly interchangeable, but there is some difference. See this Usage Note taken from the OALD:
The adjectives near and close are often the same in meaning, but in some phrases only one of them may be used:
The near future ◇ a near neighbour ◇ a near miss ◇ a close contest ◇ a close encounter ◇ a close call.
Close is more often used to describe a relationship between people: a close friend ◇ close family ◇ close links. You do not usually use near in this way.