We propose an analytical model for the force-indentation relationship in viscoelastic materials exhibiting a power law relaxation described by an exponent n, where n = 1 represents the standard viscoelastic solid (SLS) model, and n < 1 represents a fractional SLS model. To validate the model, we perform nanoindentation measurements of poylacrylamide gels with atomic force microscopy (AFM) force curves. We found exponents n < 1 that depends on the bysacrylamide concentration. We also demonstrate that the fitting of AFM force curves for varying load speeds can reproduce the dynamic viscoelastic properties of those gels measured with dynamic force modulation methods.