Replacing 'cone nuts' on a damaged coaster brake
The term "cone nut", on a bike, generally refers to the nuts that comprise the outer half of a bearing race (the inner half being formed into the wheel hub or whatever).  The "cone" side, which faces inward, has a concave profile so that the balls will roll smoothly in it.

It's hard to tell what you have from your description.  I do vaguely recall some cases of nuts on coaster brakes with slots like that, apparently intended to be operated by a "spanner wrench" (which is a redundant expression in the UK, but means a wrench with pins rather than flats in the US).  Presumably this allowed the nut to be more readily adjusted while everything was assembled.  (Current bikes require a thin "cone wrench" for the same adjustment.)  If this is all it is then a hex-sided/flat-sided nut (with similar thread/profile) should work just fine.

I've also seen, internal to some coaster hubs, various plates and nuts with slots or teeth, intended to engage mirror-image features of the hub or an internal rotating piece.  These would be quite specific to the particular hub.

And it may be that this nut is a cone nut for internal bearings, such that the nut cannot be reached for adjustment with a regular wrench (even a thin one).  In that case you'd have to figure out something.

It's remarkably hard to find a good image of a cone nut.  Here is the best I could find:



This one has a sheet metal dust shield fastened to the outer diameter -- the nut itself is inside of the inner flange of the shield.  On the back side is a regular (though fairly thin) hex nut or (more often) a cylindrical body with two flats, sized to take a thin open-end wrench.

(It should be noted that it's become common to refer to any nut that secures a bike bearing as a "cone nut", even though it may be securing a sealed bearing cartridge and hence lack the conical extension.  This adds a lot to the confusion.)