Distributed optimization has been a significantly important topic in recent multi-agent networked systems research for a variety of real-life applications. Most of the previous works are focused on how to find the globally optimal solution under certain assumptions on the objective functions as well as the agent interaction characteristics. However, in many practical problems (specifically, where agents form multiple sub-groups smaller than the overall multi-agent system based on commonalities of objective functions or nature of connectivity), globally optimal solution may not be very useful and quite difficult to achieve. Achieving multiple local optimal solutions for different sub-groups may be more useful in these cases. In this context, this paper presents a new distributed optimization problem formulation by introducing a modified cost function involving a parameter that controls the tradeoff between consensus and disagreement enabling realization of the entire spectrum of globally optimal solution to multiple locally optimal solutions. A distributed generalized consensus-based gradient (DGCG) algorithm is proposed to solve such an optimization problem for strongly convex objective functions. We show the convergence analysis of the proposed algorithm and two illustrative numerical examples for validating the methodology.