I would like to know how to proceed regarding fruit collection from a tree which grew for four years in a container and it is then replanted.
Re-potting the plant, meaning that the plant is transferred, earth and all, to another pot, does not affect the count of years for orlah. As long as the plant could have survived for a few days in the interim.
See Yoreh De’ah 294; the time for which the plant must be able to survive in the clod of earth is a subject of dispute, and it may be up to 14 days. See Rashba 3:235; Pischei Teshuva, 294; Ne’os Desheh 32; Mishpat Kohen 8; see a discussion of the issue in Kol Torah, 5693; Tzitz Eliezer 1:19; Chazon Ish 2:10-12.
The source for this ruling is a Mishnah (Orlah 1:3), and authorities dispute the time that the earth needs to last the tree. The Rashba writes that this is a safek and the Shut Perach Mateh Aharon (cited by the Pischei Teshuvah 294:13) writes that the tree must be able to survive for three years. However, the Rashba himself concludes that “a number of days is sufficient,” and the great majority of authorities are lenient in this matter: See Chazon Ish (Orlah 2:12); Mishpat Cohen (8); Minchas Shlomo (69); among others.