Peel and chop nectarines (you can blanch them first for easier peeling).
Combine nectarines, sugar, and lemon juice in a saucepan.
Cook over medium heat, stirring frequently, until fruit softens (about 10 minutes).
Mash with a potato masher for a chunkier texture or blend for smooth jam.
Add pectin (if using) and bring to a full rolling boil for 1–2 minutes.
Simmer until thickened, about 20–30 minutes, stirring often.
Pour into sterilized jars. Let cool, then refrigerate or process in a hot water bath for long-term storage.