In this case 'next to' the door is more accurate.
'next to' means 'nearest in position' ,'lying near, close to something ', so in your example the chair being beside the door applies it being 'next to' the door.
'near' means 'within a short distance of space ( could be time ,but in your example it is 'space').
So when using ' the chair near the door ' it is not necessarily the nearest, there could be something between the chair and the door.