Localized states in composite crystals with a junction impurity