If density perturbations are scale invariant then the dependence should be more like k^0, where k is the wave number. Then why do we define that scale invariant perturbations has spectral index 1. What is the advantage of this choice?
You are absolutely right. Indeed if one uses the most common definition for the spectral index (according e.g. to "The Primordial Density Perturbations" by D. Lyth and A. Liddle) which is given by n-1 = d ln(P(k))/d ln(k), where n is the spectral index an P the spectrum of the curvature perturbations, one gets that P is proportional to k^(n-1) (assuming n = cst.!). Therefore the spectrum is scale invariant for n=1. For non-constant n you have to take into account the running of the spectral index.