try
...| transaction Field_name startswith="New" endswith="Resolved"|eval duration = duration|...
The first answer using "stats" (not using "transaction") will be more effective (the max_span, etc. values are infinite) and also MUCH more efficient (quicker to run).
Let's say the field that you were using in your transaction command is "CorrelationField" then this should work:
... | stats earliest(_time) AS first latest(_time) AS last by CorrelationField | eval duration=last-first