The Gills will be in Group A of the southern section of the Papa John's Trophy.
Gillingham will play Ipswich Town, Colchester United and West Ham U21's in the Papa John's Trophy group stages.
Steve Evans' men were drawn in Group A of the southern section on Wednesday, and were initially paired with both Ipswich and Colchester.
However, on Thursday afternoon, West Ham U21's were added to the group with invited clubs completing the draw process.
Last season, Ipswich were again in Gills group but were joined by Crawley and Arsenal U21's. Gillingham prevailed as runners-up, but lost to Cambridge in the knockout stages at the Abbey Stadium.
Fixture details will follow.