That this righteousness [the imputed righteousness of Christ] still resides in and with the person of Christ, even then when we stand just before God thereby, is clear, for that we are said, when justified, to be justified ‘in him.’ ‘In the Lord shall all the seed of Israel be justified.’ And again, ‘Surely, shall one say, In the Lord have I righteousness,’ &c. (Isa 45:24,25). And again, ‘But of him are ye in Christ Jesus, who of God is made unto us – righteousness’ (1 Cor 1:30). Mark, the righteousness is still ‘in him,’ not ‘in us,’ even then when we are made partakers of the benefit of it; even as the wing and feathers still abide in the hen when the chickens are covered, kept, and warmed thereby. For as my doings, though my children are fed and clothed thereby, are still my doings, not theirs; so the righteousness wherewith we stand just before God from the curse, still resides in Christ, not in us. Our sins, when laid upon Christ, were yet personally ours, not his; so his righteousness, when put upon us, is yet personally his, not ours. What is it, then? Why, ‘he was made to be sin for us, who knew no sin; that we might be made the righteousness of 3 God in him’ (2 Cor 5:21).
The Works of John Bunyan Vol. 1: Justification by An Imputed Righteousness (Edinburgh, Scotland; Banner of Truth Trust, 1991)