Most likely the noise is normal. Are you working the tractor (pulling something heavy, or going up hills, or pushing a loader bucket into a pile, etc) when it makes the noise? My 2520 whines more in high than in low, and also whines more when working it at less than 3/4 throttle. A hydrostatic transmission pump will make full pressure at just over idle, but fluid flow is a function of pump speed, so run it at 3/4 to full throttle (PTO speed, which is marked on the tachometer face) when doing more than moving the tractor from point A to B.. The lift and ground speed will be faster, too. If you don't know the last time the transmission was serviced, change the fluid and filter (oil, too), and make sure the fluid level is correct.
If you're new to these machines, the 2320 has a drive shaft between engine and transmission, which is a major failure point if it is not maintained properly, which means greasing the U-joint on the shaft regularly. It is notoriously difficult to get to, I think you may have to take up a floor board or the center cover between the floor boards to access it. The 2520 and 2720 don't have the shaft.