There is no stated maximum distance for connecting the DS18B20. The transmission range highly depends on the system's environment and design. Instead of specifying a distance, the part is specified by logic level and timing thresholds. As long as the system can satisfy the timing and voltage considerations, it will work fine.