You were exporting at High (300dpi) resolution. On the other hand, "Save for Web" has an automatic resolution of 72dpi. The 300dpi PNG is larger than the 72dpi PNG because the number of pixels in the image has increased, while the print size has remained the same.
It's easy to Export an image to PNG with specific pixel dimensions if the target resolution is 72dpi. Simply set up the Artboard to exact pixel dimensions and Export with "Use Artboards" selected.
However, exporting an image in Adobe Illustrator to PNG format with specific pixel dimensions using the High (300 dpi) resolution setting, unfortunately seems to require math on a user's part and potential manual resizing of artwork. I haven't found any automated solution for this in Illustrator settings nor online.
Divide your final desired pixel width by 4.166 (Using the example from the question, 1020px / 4.166 = 244.839).
In Illustrator, set General Unit Preferences to "Pixels."
Create a blank Artboard at your final desired pixel dimensions (in this example, 1020px x 100px) or resize an existing Artboard to your final desired pixel dimensions.
Keeping proportions locked, change the Artboard width to the quotient in step 2, rounded up or down to a whole number, as appropriate. (In this example, the width would now be 245px and the height will have automatically changed in relation to the width to 24px).
Add art to Artboard or resize existing artwork to fit.
Export to PNG with "Use Artboards" specified, using High (300 dpi) resolution.
The result should be a PNG file of the image with 300dpi resolution and final desired pixel dimensions (in the example, 1020px x 100px).
By the way, "4.166" represents the amount of enlargement that occurs when a 72dpi image is converted to 300dpi. If you Export a file in Illustrator to PNG format with the Artboard set up to your final desired pixel dimensions, and with "Use Artboards" and High (300dpi) resolution specified, the dimensions of the resulting PNG file will be 4.166 times larger than your final desired dimensions.
Converted pixel width, at 300dpi / final desired pixel width, at 72dpi = 4.166
(Using example, 4250 / 1020 = 4.166)
I'd love to know if anyone knows of an automated way of doing this!