The variable location kernel (VLK) method provides a nonparametric estimator for a probability density function. This article proposes the VLK method to fit line transect data in order to estimate the density of a biological population. The method produces two promising estimators for the density of objects which improve upon the performance of the classical kernel estimator. Although the two proposed estimators share a common form, they exhibit rather different performances. To compute the bias and variance of the proposed estimators, the bootstrap technique is proposed. For a wide range of possible models for line transect data, a comparison of the two estimators and the classical kernel estimator is carried out by simulation. The results show the practical potential of the proposed estimators over the classical kernel estimator for almost all cases considered. Two previously published data sets are also analyzed and the results confirm the good performances of the proposed estimators.