Cultivated varieties of sweetpeas have no fragrance. When bred to produce a quality such as long stems or one color, fragrance is lost.
More unlikely, but possible, is that your sweetpeas are getting heavy doses of nitrogen. Over-use of nitrogren causes
flowers and herbs to lose fragrance.
Look for species or old-fashioned varieties of sweetpeas. These will usually be multi-colored with short stems but will have that wonderful sweet fragrance you remember.
For healthy fragrant plants don't plant sweetpeas in the same place two years in a row. They are very heavy feeders and will quickly deplete soil nutrients.