Sorry Dave... as Ron has advised above... it is probably illegal depending on it's configuration.
(Huh?)
If your gun was not appropriately manufactured as an artillery model (Erfurt or DWM) and dated during the period of original artillery model manufacture 1914-1918, then it is very likely that it is not legal.
So for example, WW2 Mauser/Kreighoff/Simpson made Lugers would not qualify as an Artillery model.
If it is a commercial Artillery model, then it might be.
If yours is simply a commercial Luger with a barrel shorter than 16" and is not listed on the BATFE C&R list, then GET YOURSELF an Artillery Model or you might sell the stock so you won't get tempted to do that again...
Time was (that's when old folks like me where young and Lugers were $100 or less) when possession of both a Luger shourlder stock and a non-C&R Luger could be viewed by the BATFE (and its predecessor organizations) as
"constructive intent" to possess a "Short Barreled Rifle" without the proper tax documentation... not a good position to be in. It all depends on who the agent is, and what kind of mood he is in when you are "caught'... Don't take any chances...
Show a photo of the Luger in question (without the stock please!), and describe it's major markings, and we can better advise you.