The conventional approach for collecting data in sensor networks is the combination of automatic repeat-request techniques with a collection tree scheme in which all routes end up in the sink node. A high number of acknowledgments and retransmissions is the main drawback of this scheme. Erasure-correcting codes, in particular Fountain codes, can be employed to reduce the number of retransmissions. In the collection tree scheme, it is common for multiple routes to share a bottleneck. In such scenarios, to reach the optimal network throughput, it is necessary to combine the Fountain codes and Network Coding (NC) technique. Y-networks can be considered as an abstraction to this scenario. This article proposes a new algorithm, namely, Adaptive Distributed LT code (ADLT), for combining LT codes with NC in Y-networks. The ADLT algorithm enables belief propagation decoding by employing a novel technique called degree distribution updating, to preserve Robust Soliton degree distribution at destination. Unlike previously proposed algorithms in the literature, the ADLT algorithm has the flexibility to handle any number of sources with different block sizes and transmission rates, where sources perform standard LT coding. Simulation results confirm that the performance of the ADLT algorithm is close to that of standard LT code.