Jarasandh is fighting to avenge death of husband of her daughter and other members of his clan.She was wife of kans .
Jarasand is fighting to avenge their death as Krishna had killed his sons also.He is not shown as evil in Dasam Granth sahib.Jarasandh's
name comes in Baghwat Purana also but he is not described waging this war with Krishna.
There are copies of Bhagwat Puranas made by european historians more than hundred years ago.Obviously there is no alteration in there.
Moreover Guru Sahib writes in the beginning of Yudh parbandhe, his own writing
ਜੋ ਬਲ ਬੰਡ ਬਡੇ ਦਲ ਮੈ ਤਿਹ ਅਗ੍ਰ ਕਥਾ ਮਹਿ ਨਾਮ ਕਹੈ ਹਉ ॥ ਜੋ ਸੰਗਿ ਸਯਾਮ ਲਰੈ ਰਿਸ ਕੈ ਤਿਨ ਕੇ ਜਸ ਕੋ ਮੁਖ ਤੇ ਉਚਰੈ ਹਉ ॥
जो बल बंड बडे दल मै तिह अग्र कथा महि नाम कहै हउ ॥ जो संगि सयाम लरै रिस कै तिन के जस को मुख ते उचरै हउ ॥
In the forthcoming story, I have mentioned the names of those great heroes,
Who fought with Krishna in great rage and will eulogise them
ਜੇ ਬਲਭਦ੍ਰ ਕੇ ਸੰਗਿ ਭਿਰੇ ਤਿਨ ਕਉ ਕਥਕੈ ਪ੍ਰਭ ਲੋਕ ਰਿਝੈ ਹਉ ॥ ਤਯਾਗ ਸਭੈ ਗ੍ਰਹਿ ਲਾਲਚ ਕੋ ਹਰਿ ਕੇਹਰਿ ਕੇ ਹਰਿਕੇ ਗੁਨ ਗੈਹਉ ॥੧੦੩੭॥
जे बलभद्र के संगि भिरे तिन कउ कथकै प्रभ लोक रिझै हउ ॥ तयाग सभै ग्रहि लालच को हरि केहरि के हरिके गुन गैहउ ॥१०३७॥
Those heroic fighters who have fought with Balbhadra i will mention them too and please devotees Of God ( ਪ੍ਰਭ ਲੋਕ )
Leaving aside greed of material possessions i will singh praises of God
Krishna avtar, Dasam Granth sahib
Additionally, just before beginning of Yudh parbandhe, previous section ends as below and Guru sahib writes that this has been taken from Bhagwat Purana
ਇਤਿ ਸ੍ਰੀ ਦਸਮ ਸਿਕੰਧੇ ਬਚਿਤ੍ਰ ਨਾਟਕੇ ਕ੍ਰਿਸ਼ਨਾਵਤਾਰੇ ਰਾਜਾ ਉਗ੍ਰਸੈਨ ਕਉ ਮਥੁਰਾ ਕੋ ਰਾਜ ਦੀਬੋ ॥
इति स्री दसम सिकंधे बचित्र नाटके क्रिशनावतारे राजा उग्रसैन कउ मथुरा को राज दीबो ॥
End of the description of "Handing over the kingdom of Matura to the king Uggarsain" in Krishnavatara (based on Dasham Skandh) in Bachittar Natak.
But in case of whole section of yudh parbandhe, name of purana does not exist. For example various subsections end like as given below
ਇਤਿ ਕ੍ਰਿਸ਼ਨਾਵਤਾਰੇ ਜੁੱਧ ਪ੍ਰਾਰੰਭ ਗਜ ਸਿੰਘ ਬਧਹਿ ਧਿਆਇ ਸਮਾਪਤਮ ॥
इति क्रिशनावतारे जु्ध प्रा्रमभ गज सिंघ बधहि धिआइ समापतम ॥
End of the chapter entitled "Killing of Gaj Singh in the beginning of war" in Krishnavatara.
Krishna avtar, Yudh parbandhe, Dasam Granth sahib
Moreover we should follow parameters of Dasam Granth sahib writings.Since Jarasandh is shown there as an aggrieved person who fights to avenge excesses committed by Krishna, we should not call him evil.Singhs fighting on his side are shown far more principles than Krishna.