Leveling will move tasks into the future until the resource(s) assigned to
it are available. If your task is getting delayed by 3 years by leveling,
it means the first time the resource assigned to it shows enough percentage
free is three years into the future. Now that's pretty weird, I'd agree,
and seems to indicate something is not set correctly. To find the exact
reason you need to look at things like task priorities, the resource's
calendar, the resource's available from and to data, and the like.
Here's one way it might happen. Try this experiment, it might give you some
ideas where to start looking in your own project. Create a plan with one
task "Build Something" with 5 days duration, starting next week. Enter a
resource "Carpenters" in the Resource Sheet view. Click on the ID number
and in the Resource Information show that Carpenters are available at 100%
until the end of the year and the 300% after Jan 01 (we've got one guy right
now but will hire 2 more after the holidays). Back in the Gantt chart,
assign Carpenters to the task 200% (we figure it will require 2 guys working
together to do it). The resource sheet will show the Carpenters in red,
overallocated. Run Resource Leveling. You'll see the task jump out to
start the first week of January, the first point in time where we'll have
two men available to work together on the task, ie, a resource assignment of
200% is valid. Something like this is probably going on in your plan though
pinning it down might take a bit of digging.