The A1s are going to be either 18.5" or 20" guns except for the NFA lines, which are 14.5" barrels. There was a very limited number of 16" breacher barrel and 14.5" retrofit kits.
If you have a bayonet lug, then you have a 20" gun. The 18.5" barrel does not have a bayonet lug, and won't accept one. Not all shotguns (very few of them actually) in use by the military have a bayonet lug. The requirement for that depends on the type of shotgun being requested/purchased (more on that later).
The mark on your barrel is just a proof mark for the barrel.
All A1s have the heavy barrel (except for a small run of 18.5" standard barrels for Anniston), metal safety button, and metal trigger guard. There will be "590A1" rollmarked on the left side of the reciever. The bottom of the receiver forward of the ejection port should be stamped with "Mossberg Made In USA North Haven, Conn 590 12 Ga." Otherwise they are the same as the 590. You can switch the barrels, safeties, and trigger guards between them.
Some 500s have 590 features, and some 590s have 500 features; mainly referring to the magazine tube and barrel lug arrangements. The 500 and 590/590A1 series share the same receivers. There were a few 500s purchased with the heavy 590A1 type barrel and mag tube cleanout/barrel lug assembly. These were 18.5" guns. There was a large run of 500s with a 20" barrel and mag tube cleanout for USNWSC. There were some 500s with 20" barrels and a 6 round capacity. There were some wood stock models, but in general the .mil guns have synthetics. There were also some Butler Creek folding stock models. I don't think any of the contract run productions have ever used the Speedfeed magazine stocks, although you may see some in use on a .mil shotgun.
The 590A1 was produced in rather limited numbers for the .mil. The largest production runs of Mossbergs were actually the 500 series, and continue to the be the most commonly purchased by the .mil in recent years. The most common Mossbergs (and actually the most common shotgun currently in the .mil) is a Mossberg 500A or even the 500MIL. These are typically the 18.5" 6 shot model.
The problem with determining if yours is in use by an actual .mil group is that a lot of Mossbergs were bought COTS and some units used RFI funds to buy Mossbergs that were not otherwise contracted from OFM. The GWOT opened up a lot of atypical funding and procurement for units to allow them to buy equipment that was needed even if it was not part of the usualy supply system or was outside of the usual supply catalog. As such, there are a lot of variances in Mossbergs depending on the individual unit using them. Your 18.5" A1 has definitely been used by the .mil and I've seen several examples like yours. The 20" 590 and to a lesser degree the 20" 590A1 has been used as well. However, these (and several other configurations) may not be represented in an actual contract production run.
The A1s are built to the MilSpec for shotguns, and depending on if it has a bead sight, rifle sight, ghost ring sights, bayonet lug, and heatshield determines what type of shotgun it is within that MilSpec. I believe there are three types based on those characteristics if I remember correctly.
Using the Mossberg codes, a "51XXX" is going to indicate an A1 variant, and a "50XXX" is going to indicate a standard 590 variant in general terms. If you still have your box it will have the model number as well.
To further complicate things, there are some previously mentioned retrofit kits that supply a new barrel, mag tube, and slide assembly in either a 14.5" A1 CYL bead sight or a 16" A1 breacher CYL bead sight arrangement. This allows a unit to take what may be a 500 or 590/590A1 of various barrel and magazine configurations and standardize them into a CQB gun or breacher gun. Pro Patria assembles/sells these kits and provides them with an end-user kit with accessories.