The image distance in the eye, is fixed and cannot be changed. The ability of the eye lens to adjust its focal length is called accommodation.
Due to this eye can increase or decrease focal length of the lens in order to see either close or distant objects.
In order to see nearby objects the ciliary muscles contract and lens become thick and focal length is decreased which helps to see nearby objects.
In order to see distant objects the ciliary muscles expand and the lens become thin and focal length increases which help to see distant objects.