I just rebuilt my transmission on a 2001 x5 3.0L. Same problem.
I was told that the oil pump was faulty and a piece of the pump went into the gears. The dealer could not help. I went to Mr. Transmission. 6,500 dollars later no problem.
They knew right- a- way what the problem was.